|
Jameo Core Library
|
Date represents a date or time. More...
Public Member Functions | |
| Date () | |
| Standard default constructor. | |
| Date (const Date &other) | |
| Copyconstruktor. | |
| Date (int64 milliseconds) | |
| Constructor. | |
| Date (uint16 year, uint16 month, uint16 day) | |
| Constructor. | |
| Date (uint16 year, uint16 month, uint16 day, uint16 hours, uint16 minutes, uint16 seconds, uint16 millis=0) | |
| Constructor. | |
| ~Date () override | |
| Destructor. | |
| bool | isEmpty () const |
| Status, whether the data is empty. | |
| int64 | time () const |
| Returns the time passed in milliseconds, relative to 00:00:00 UTC on 1 January 1970. | |
| void | setTime (int64 t) |
| Defines the time passed in milliseconds, relative to 00:00:00 UTC on 1 January 1970. | |
| int64 | year () const |
| Returns the year in local time. | |
| int64 | utcYear () const |
| Returns the year in UTC time. | |
| int64 | month () const |
| Returns the month in local time. | |
| int64 | utcMonth () const |
| Returns the month in UTC time. | |
| int64 | date () const |
| Returns the day of the month in local time. | |
| int64 | utcDate () const |
| Returns the day of the month in UTC time. | |
| int64 | day () const |
| Returns the day of the week in local time. | |
| int64 | utcDay () const |
| Returns the day of the week in UTC time. | |
| int64 | hours () const |
| Returns the hours of the day in local time. | |
| int64 | utcHours () const |
| Returns the hours of the day in UTC time. | |
| int64 | minutes () const |
| Returns the minutes of the hour in local time. | |
| int64 | utcMinutes () const |
| Returns the minutes of the hour in UTC time. | |
| int64 | seconds () const |
| Returns the seconds of the minute in local time. | |
| int64 | dayOfYear () const |
| Returns the day of the year. | |
| int64 | utcSeconds () const |
| Returns the seconds of the minute in UTC time. | |
| int64 | milliseconds () const |
| Returns the milliseconds of the second in local time. | |
| int64 | utcMilliseconds () const |
| Returns the milliseconds of the second in UTC time. | |
| String | toString () const |
| Returns the date in the default date format: YYYY-MM-DDThh:mm:ss.sssZ. | |
| int32 | compareTo (const Date &another) const override |
| This method compares the order of the data. | |
Public Member Functions inherited from jm::Comparable< Date > | |
| Comparable () | |
| virtual | ~Comparable () |
Static Public Member Functions | |
| static Date | fromNSDate (double nsdate) |
| Constructor for a Date value given as a NSDate double value (typically on Mac) | |
Static Public Attributes | |
| static const int64 | MS_PER_DAY = 86400000 |
| Constant saves the millisecons of a day. | |
| static const int64 | HOURS_PER_DAY = 24 |
| static const int64 | MINUTES_PER_HOUR = 60 |
| static const int64 | SECONDS_PER_MINUTE = 60 |
| static const int64 | MS_PER_SECOND = 1000 |
| static const int64 | MS_PER_MINUTE = 60000 |
| static const int64 | MS_PER_HOUR = 3600000 |
| static const int16 | JANUARY = 0 |
| static const int16 | FEBRUARY = 1 |
| static const int16 | MARCH = 2 |
| static const int16 | APRIL = 3 |
| static const int16 | MAY = 4 |
| static const int16 | JUNE = 5 |
| static const int16 | JULY = 6 |
| static const int16 | AUGUST = 7 |
| static const int16 | SEPTEMBER = 8 |
| static const int16 | OCTOBER = 9 |
| static const int16 | NOVEMBER = 10 |
| static const int16 | DECEMBER = 11 |
| static const int16 | SUNDAY = 0 |
| static const int16 | MONDAY = 1 |
| static const int16 | TUESDAY = 2 |
| static const int16 | WEDNESDAY = 3 |
| static const int16 | THURSDAY = 4 |
| static const int16 | FRIDAY = 5 |
| static const int16 | SATURDAY = 6 |
| static const int64 | EMPTY = static_cast<int64>(0x8000000000000000) |
Friends | |
| DllExport friend bool | operator< (Date const &v1, Date const &v2) |
| Implementing the operator <. | |
| DllExport friend bool | operator> (Date const &v1, Date const &v2) |
| Implementing the operator > | |
| DllExport friend bool | operator<= (Date const &v1, Date const &v2) |
| Implementing the operator <=. | |
| DllExport friend bool | operator>= (Date const &v1, Date const &v2) |
| Implementing the operator >=. | |
| DllExport friend bool | operator== (Date const &v1, Date const &v2) |
| Implementing the operator ==. | |
| DllExport friend bool | operator!= (Date const &v1, Date const &v2) |
| Implementing the operator !=. | |
Date represents a date or time.
Internally, the time is stored in milliseconds from 01.01.1970 0:00 UTC. This time is referred to as absolute time in this context. Leap seconds are ignored.
The basis of this implementation is the Date object from the ECMA standard. The basis is the Gregorian calendar.
If the value is 0x800000000000 || -9223372036854775808 (minimum), then the date is considered "Empty" "Zero" "Nil"
| jm::Date::Date | ( | ) |
Standard default constructor.
| jm::Date::Date | ( | const Date & | other | ) |
Copyconstruktor.
|
explicit |
Constructor.
| milliseconds | Absolute time (UTC) passed in milliseconds since 01.01.1970 00:00:00.000. |
| jm::Date::Date | ( | uint16 | year, |
| uint16 | month, | ||
| uint16 | day | ||
| ) |
Constructor.
| year | Year |
| month | Month number (0-11) |
| day | Day number (1-31) |
| jm::Date::Date | ( | uint16 | year, |
| uint16 | month, | ||
| uint16 | day, | ||
| uint16 | hours, | ||
| uint16 | minutes, | ||
| uint16 | seconds, | ||
| uint16 | millis = 0 |
||
| ) |
Constructor.
| year | Year |
| month | Month number (0-11) |
| day | Day number (1-31) |
| hours | Hours (0-23) |
| minutes | Minutes (0-59) |
| seconds | Seconds (0-59) |
| millis | Milliseconds (0-999) |
|
override |
Destructor.
|
overridevirtual |
This method compares the order of the data.
| another | The date used for the comparison. |
Implements jm::Comparable< Date >.
| int64 jm::Date::date | ( | ) | const |
Returns the day of the month in local time.
| int64 jm::Date::day | ( | ) | const |
Returns the day of the week in local time.
| int64 jm::Date::dayOfYear | ( | ) | const |
Returns the day of the year.
|
static |
Constructor for a Date value given as a NSDate double value (typically on Mac)
| nsdate | double value, representing the time in seconds relative to 00:00:00 UTC on 1 January 2001. |
| int64 jm::Date::hours | ( | ) | const |
Returns the hours of the day in local time.
| bool jm::Date::isEmpty | ( | ) | const |
Status, whether the data is empty.
| int64 jm::Date::milliseconds | ( | ) | const |
Returns the milliseconds of the second in local time.
| int64 jm::Date::minutes | ( | ) | const |
Returns the minutes of the hour in local time.
| int64 jm::Date::month | ( | ) | const |
Returns the month in local time.
| int64 jm::Date::seconds | ( | ) | const |
Returns the seconds of the minute in local time.
| void jm::Date::setTime | ( | int64 | t | ) |
Defines the time passed in milliseconds, relative to 00:00:00 UTC on 1 January 1970.
| t | New time in UTC. |
| int64 jm::Date::time | ( | ) | const |
Returns the time passed in milliseconds, relative to 00:00:00 UTC on 1 January 1970.
| String jm::Date::toString | ( | ) | const |
Returns the date in the default date format: YYYY-MM-DDThh:mm:ss.sssZ.
| int64 jm::Date::utcDate | ( | ) | const |
Returns the day of the month in UTC time.
| int64 jm::Date::utcDay | ( | ) | const |
Returns the day of the week in UTC time.
| int64 jm::Date::utcHours | ( | ) | const |
Returns the hours of the day in UTC time.
| int64 jm::Date::utcMilliseconds | ( | ) | const |
Returns the milliseconds of the second in UTC time.
| int64 jm::Date::utcMinutes | ( | ) | const |
Returns the minutes of the hour in UTC time.
| int64 jm::Date::utcMonth | ( | ) | const |
Returns the month in UTC time.
| int64 jm::Date::utcSeconds | ( | ) | const |
Returns the seconds of the minute in UTC time.
| int64 jm::Date::utcYear | ( | ) | const |
Returns the year in UTC time.
| int64 jm::Date::year | ( | ) | const |
Returns the year in local time.
Implementing the operator !=.
Implementing the operator <.
Implementing the operator <=.
Implementing the operator ==.
Implementing the operator >
Implementing the operator >=.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Constant saves the millisecons of a day.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |