KHolidays 5.109.0
Public Types | Static Public Member Functions | List of all members
KHolidays::LunarPhase

Represents and manages a Lunar Phase. More...

#include <lunarphase.h>

Public Types

enum  Phase {
  NewMoon , FirstQuarter , LastQuarter , FullMoon ,
  None , WaxingCrescent , WaxingGibbous , WaningGibbous ,
  WaningCrescent
}
 Phases of the moon, in traditional English notation. More...
 

Static Public Member Functions

static Phase phaseAtDate (const QDate &date)
 Return the lunar phase for the specified Gregorian date.
 
static QString phaseName (Phase phase)
 Return the string representation of phase.
 
static QString phaseNameAtDate (const QDate &date)
 Return the lunar phase as a text string for the specified date.
 

Detailed Description

Represents and manages a Lunar Phase.

A Lunar Phase can be one of the following:

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

Member Enumeration Documentation

◆ 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 

New moon phase.

FirstQuarter 

First quarter of moon phase.

LastQuarter 

Last quarter of moon phase.

FullMoon 

Full moon phase.

None 

Indication for error.

WaxingCrescent 
Since
5.94
WaxingGibbous 
Since
5.94
WaningGibbous 
Since
5.94
WaningCrescent 
Since
5.94

Member Function Documentation

◆ phaseAtDate()

static Phase KHolidays::LunarPhase::phaseAtDate ( const QDate &  date)
static

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
datecompute the lunar phase for the specified Gregorian date.

◆ phaseName()

static QString KHolidays::LunarPhase::phaseName ( Phase  phase)
static

Return the string representation of phase.

Parameters
phasethe lunar phase.

◆ phaseNameAtDate()

static QString KHolidays::LunarPhase::phaseNameAtDate ( const QDate &  date)
static

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
datecompute the lunar phase for the specified Gregorian date.