• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

libkholidays

LibKHolidays::LunarPhase

LibKHolidays::LunarPhase Class Reference

#include <lunarphase.h>

List of all members.


Detailed Description

Represents and manages a Lunar Phase.

A Lunar Phase can be one of the following:

+ "new": the moon is not visible; or traditionally: first visible crescent of the Moon. For religious purposes, the new month begins when the first crescent moon can be seen. Thus, it is impossible to be certain in advance of when months will begin; in particular, the exact date on which Ramadan will begin is not known in advance. In Saudi Arabia, observers are sent up in airplanes if the weather is cloudy when the new moon is expected. + "first quarter": the right 50% of the moon is visible. + "full": the moon is fully visible. + "last quarter": the left 50% of the moon is visible.

A very good description of the lunar phases can be read at the Wikipedia, http://en.wikipedia.org/wiki/Lunar_phase

Note that crescent and gibbous phases are not currently supported.

Definition at line 54 of file lunarphase.h.


Public Types

enum  Phase {
  NewMoon, FirstQuarter, LastQuarter, FullMoon,
  None
}

Public Member Functions

 LunarPhase ()
Phase phase (const QDate &date) const
QString phaseStr (const QDate &date) const
 ~LunarPhase ()

Static Public Member Functions

static QString phaseName (Phase phase)

Member Enumeration Documentation

enum LibKHolidays::LunarPhase::Phase

Phases of the moon, in traditional English notation.

The phase None is used only as an error indicator, for instance in phase().

Enumerator:
NewMoon 
FirstQuarter 
LastQuarter 
FullMoon 
None 

Definition at line 62 of file lunarphase.h.


Constructor & Destructor Documentation

LunarPhase::LunarPhase (  ) 

Constructor.

Definition at line 34 of file lunarphase.cpp.

LunarPhase::~LunarPhase (  ) 

Destructor.

Definition at line 38 of file lunarphase.cpp.


Member Function Documentation

LunarPhase::Phase LunarPhase::phase ( const QDate &  date  )  const

Return the lunar phase for the specified Gregorian date.

The enum 'None' is returned if one of the supported phases does not occur on the date.

Parameters:
date compute the lunar phase for the specified Gregorian date.

Definition at line 64 of file lunarphase.cpp.

QString LunarPhase::phaseName ( LunarPhase::Phase  phase  )  [static]

Return the string representation of phase.

Parameters:
phase the lunar phase.

Definition at line 47 of file lunarphase.cpp.

QString LunarPhase::phaseStr ( const QDate &  date  )  const

Return the lunar phase as a text string for the specified date.

A null string is returned if one of the supported phases does not occur on the date.

Parameters:
date compute the lunar phase for the specified Gregorian date.

Definition at line 42 of file lunarphase.cpp.


The documentation for this class was generated from the following files:
  • lunarphase.h
  • lunarphase.cpp

libkholidays

Skip menu "libkholidays"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal