KHolidays Library
22 #include "astroseasons.h"
24 #include <KLocalizedString>
26 #include <QtCore/QDate>
28 using namespace KHolidays;
30 QString AstroSeasons::seasonNameAtDate(
const QDate &date )
32 return seasonName( seasonAtDate( date ) );
35 QString AstroSeasons::seasonName( AstroSeasons::Season season )
39 return i18n(
"June Solstice" );
40 case DecemberSolstice:
41 return i18n(
"December Solstice" );
43 return i18n(
"March Equinox" );
44 case SeptemberEquinox:
45 return i18n(
"September Equinox" );
52 AstroSeasons::Season AstroSeasons::seasonAtDate(
const QDate &date )
55 Season retSeason = None;
57 const int year = date.
year();
59 if ( date ==
QDate( year, 6, 22 ) ) {
62 if ( date ==
QDate( year, 12, 22 ) ) {
63 return DecemberSolstice;
65 if ( date ==
QDate( year, 3, 22 ) ) {
68 if ( date ==
QDate( year, 9, 22 ) ) {
69 return SeptemberEquinox;
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:00 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.