|
MoSync 3.3
|
DateTime is a C++ class for time stamps. More...
#include <MAP/DateTime.h>
Public Member Functions | |
| DateTime () | |
| DateTime (time_t t) | |
| DateTime (tm *tim) | |
| DateTime (int year, int month, int day) | |
| DateTime (int year, int month, int day, int hour, int minute, int second) | |
| DateTime (const char *dateString) | |
| ~DateTime () | |
| TimeSpan | timeOfDay () const |
| time_t | getTicks () const |
| int | getYear () const |
| int | getMonth () const |
| int | getWeekday () const |
| int | getDay () const |
| int | getHour () const |
| int | getMinute () const |
| int | getSecond () const |
| DateTime | add (TimeSpan timeSpan) const |
| DateTime | addYears (int years) const |
| DateTime | addMonths (int months) const |
| DateTime | addDays (double days) const |
| DateTime | addHours (double hours) const |
| DateTime | addMinutes (double minutes) const |
| DateTime | addSeconds (double seconds) const |
| DateTime | addTicks (int ticks) const |
| TimeSpan | subtract (DateTime ts) const |
| DateTime | subtract (TimeSpan span) const |
Static Public Member Functions | |
| static DateTime | maxValue () |
| static DateTime | minValue () |
| static DateTime | now () |
| static DateTime | today () |
DateTime is a C++ class for time stamps.
Constructs a DateTime with default value.
Constructs a DateTime from the specified ticks.
Ticks is the number of seconds since the beginning of January 1, 1970.
| MAPUtil::DateTime::DateTime | ( | tm * | tim | ) |
Constructs a DateTime from the specified tm structure.
| MAPUtil::DateTime::DateTime | ( | int | year, |
| int | month, | ||
| int | day | ||
| ) |
| MAPUtil::DateTime::DateTime | ( | int | year, |
| int | month, | ||
| int | day, | ||
| int | hour, | ||
| int | minute, | ||
| int | second | ||
| ) |
Constructs a DateTime from the specified year, month, day, hour, minute, and second.
| MAPUtil::DateTime::DateTime | ( | const char * | dateString | ) |
Constructs a DateTime by parsing the specified string.
Destructs a DateTime.
| static DateTime MAPUtil::DateTime::maxValue | ( | ) | [static] |
Returns the maximum value that can be represented by a DateTime.
| static DateTime MAPUtil::DateTime::minValue | ( | ) | [static] |
Returns the smallest value that can be represented by a DateTime.
| static DateTime MAPUtil::DateTime::now | ( | ) | [static] |
returns current local time as a DateTime.
Referenced by MAP::MapTile::stamp().
| static DateTime MAPUtil::DateTime::today | ( | ) | [static] |
returns today's date in local time, as a DateTime.
| TimeSpan MAPUtil::DateTime::timeOfDay | ( | ) | const |
Returns time of day as a TimeSpan from midnight.
| time_t MAPUtil::DateTime::getTicks | ( | ) | const |
Returns number of ticks since January 1, 1970. A tick is one second.
Referenced by MAPUtil::operator!=(), MAPUtil::operator+(), MAPUtil::operator-(), MAPUtil::operator<(), MAPUtil::operator<=(), MAPUtil::operator==(), MAPUtil::operator>(), and MAPUtil::operator>=().
| int MAPUtil::DateTime::getYear | ( | ) | const |
Returns the year component of a DateTime.
| int MAPUtil::DateTime::getMonth | ( | ) | const |
Returns the month component of a DateTime.
| int MAPUtil::DateTime::getWeekday | ( | ) | const |
Returns the weekday component of a DateTime.
| int MAPUtil::DateTime::getDay | ( | ) | const |
Returns the day of month component of a DateTime.
| int MAPUtil::DateTime::getHour | ( | ) | const |
Returns the hour component of a DateTime.
| int MAPUtil::DateTime::getMinute | ( | ) | const |
Returns the minute component of a DateTime.
| int MAPUtil::DateTime::getSecond | ( | ) | const |
Returns the second component of a DateTime.
| DateTime MAPUtil::DateTime::add | ( | TimeSpan | timeSpan | ) | const |
| DateTime MAPUtil::DateTime::addYears | ( | int | years | ) | const |
Adds specified number of seconds to current value and returns as a new DateTime.
| DateTime MAPUtil::DateTime::addMonths | ( | int | months | ) | const |
Adds specified number of monts to current value and returns as a new DateTime.
| DateTime MAPUtil::DateTime::addDays | ( | double | days | ) | const |
Adds specified number of days to current value and returns as a new Datetime.
| DateTime MAPUtil::DateTime::addHours | ( | double | hours | ) | const |
Adds specified number of hours to current value and returns as a new DateTime.
| DateTime MAPUtil::DateTime::addMinutes | ( | double | minutes | ) | const |
Adds specified number of minutes to current value and returns as a new DateTime.
| DateTime MAPUtil::DateTime::addSeconds | ( | double | seconds | ) | const |
Adds specified number of seconds to current value and returns as a new DateTime.
| DateTime MAPUtil::DateTime::addTicks | ( | int | ticks | ) | const |
Adds ticks to current value and returns as a new DateTime.
| TimeSpan MAPUtil::DateTime::subtract | ( | DateTime | ts | ) | const |
| DateTime MAPUtil::DateTime::subtract | ( | TimeSpan | span | ) | const |
Subtracts a timespan from current value and returns as a new DateTime.