KHolidays::AstroSeasons

Search for usage in LXR

KHolidays::AstroSeasons Class Reference

#include <astroseasons.h>

Public Types

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

Static Public Member Functions

static Season seasonAtDate (const QDate &date)
 
static QDate seasonDate (Season season, int year)
 
static QString seasonName (Season season)
 
static QString seasonNameAtDate (const QDate &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:

  • June solstice
  • December solstice
  • March equinox
  • September equinox

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.

Definition at line 38 of file astroseasons.h.

Member Enumeration Documentation

◆ Season

enum KHolidays::AstroSeasons::Season

Definition at line 41 of file astroseasons.h.

Member Function Documentation

◆ seasonAtDate()

AstroSeasons::Season 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.

Definition at line 152 of file astroseasons.cpp.

◆ seasonDate()

QDate 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

Definition at line 121 of file astroseasons.cpp.

◆ seasonName()

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

Return the string representation of season.

Parameters
seasonastronomical season.

Definition at line 135 of file astroseasons.cpp.

◆ seasonNameAtDate()

QString 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.

Definition at line 130 of file astroseasons.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:05:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.