|
VMime
|
#include <datetimeUtils.hpp>
Static Public Member Functions | |
| static bool | isLeapYear (const int year) |
| static int | getDaysInMonth (const int year, const int month) |
| static const datetime | toUniversalTime (const datetime &date) |
| static const datetime | toLocalTime (const datetime &date, const int zone) |
| static int | getDayOfWeek (const int year, const int month, const int day) |
| static int | getWeekOfYear (const int year, const int month, const int day, const bool iso=false) |
Miscellaneous functions related to date/time.
|
static |
Return the day of the week from the specified date.
| year | year in 4-digit format |
| month | month (1-12), January is 1, December is 12 (see datetime::Months enum) |
| day | month day (1-31) |
References getDaysInMonth().
Referenced by datetime::getWeekDay().
|
static |
Return the number of days in the specified month.
| year | year in 4-digit format (this is needed to check for leap years) |
| month | month, January is 1, December is 12 (see datetime::Months enum) |
References isLeapYear().
Referenced by getDayOfWeek().
|
static |
Return the week number in the year (ISO 8601).
| year | year in 4-digit format |
| month | month (1-12), January is 1, December is 12 (see datetime::Months enum) |
| day | month day (1-31) |
| iso | if TRUE, use ISO week-numbering year (default is to use calendar year). For more information, read here: http://en.wikipedia.org/wiki/ISO_8601#Week_dates |
Referenced by datetime::getWeek().
|
static |
Test whether the specified year is a leap year.
| year | year in 4-digit format |
Referenced by getDaysInMonth().
Convert the specified date/time to the specified time zone.
| date | date/time to convert |
| zone | local zone to convert to (see datetime::TimeZones enum) |
References datetime::getZone(), datetime::GMT, datetime::setZone(), and toUniversalTime().
Convert the specified date/time to UT (GMT).
| date | date/time to convert |
References datetime::getZone(), datetime::GMT, and datetime::setZone().
Referenced by datetime::operator!=(), datetime::operator<(), datetime::operator<=(), datetime::operator==(), datetime::operator>(), datetime::operator>=(), and toLocalTime().