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

Represents and manages the Astronomical Seasons (solstices and equinoxes). More...

#include <astroseasons.h>

Public Types

enum  Season {
  JuneSolstice , DecemberSolstice , MarchEquinox , SeptemberEquinox ,
  None
}
 

Static Public Member Functions

static Season seasonAtDate (const QDate &date)
 Return the season for the specified Gregorian date.
 
static QDate seasonDate (Season season, int year)
 Return the Gregorian date on which the season occurs in given year.
 
static QString seasonName (Season season)
 Return the string representation of season.
 
static QString seasonNameAtDate (const QDate &date)
 Return the season as a text string for the specified date.
 

Detailed Description

Represents and manages the Astronomical Seasons (solstices and equinoxes).

For the purposes of this class, we sometimes use the shorthand of "Season" where we really mean "Astronomical Season".

An Astronomical Season can be one of the following:

A very good description of the astronomical seasons can be read at the Wikipedia, https://en.wikipedia.org/wiki/Seasons

Note that this class represents the "Astronomical Seasons" and not the traditional "Seasons" which vary widely by culture.

Member Function Documentation

◆ seasonAtDate()

static Season KHolidays::AstroSeasons::seasonAtDate ( const QDate &  date)
static

Return the season for the specified Gregorian date.

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

Parameters
datecompute the season for the specified Gregorian date.

◆ seasonDate()

static QDate KHolidays::AstroSeasons::seasonDate ( Season  season,
int  year 
)
static

Return the Gregorian date on which the season occurs in given year.

Parameters
seasonSeason to return a date for
yearYear for which to return the date
Since
5.50

◆ seasonName()

static QString KHolidays::AstroSeasons::seasonName ( Season  season)
static

Return the string representation of season.

Parameters
seasonastronomical season.

◆ seasonNameAtDate()

static QString KHolidays::AstroSeasons::seasonNameAtDate ( const QDate &  date)
static

Return the season as a text string for the specified date.

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

Parameters
datecompute the season for the specified Gregorian date.