|
Maps SDK for C++ 1.0.0
|


Public Member Functions | |
| Time ()=default | |
| Default constructor. | |
| Time (int year, int month, int day, int hour=0, int minute=0, int second=0, int millisecond=0) | |
| Constructor from int as Timestamp with millis. | |
| Time (LargeInteger longTimeStamp) | |
| Constructor from LargeInteger as timestamp in millis from 1970 ( epoch ). | |
| Time (const Time &time)=default | |
| Default copy constructor. | |
| Time (Time &&time)=default | |
| Default move constructor noexcept is deduced. | |
| Time & | operator= (const Time &time)=default |
| Default copy assignment. | |
| Time & | operator= (Time &&time)=default |
| Default move assignment noexcept is deduced. | |
| bool | operator== (const Time &rhs) const noexcept |
| Comparison operator equal. | |
| bool | operator!= (const Time &rhs) const noexcept |
| Comparison operator not equal. | |
| bool | operator< (const Time &rhs) const noexcept |
| Comparison operator smaller. | |
| bool | operator<= (const Time &rhs) const noexcept |
| Comparison operator smaller or equal. | |
| bool | operator> (const Time &rhs) const noexcept |
| Comparison operator greater. | |
| bool | operator>= (const Time &rhs) const noexcept |
| Comparison operator greater or equal. | |
| bool | isValid () const noexcept |
| Check if the date is valid. | |
| bool | empty () const noexcept |
| Check if the date is empty value. | |
| LargeInteger | getEpoch () const noexcept |
| Number of milliseconds that have passed since 1970-01-01T00:00:00. | |
| Time & | setUniversalTime () noexcept |
| Set this instance to universal time. | |
| Time & | setLocalTime () noexcept |
| Set this instance to local time. | |
| LargeInteger | asInt () const noexcept |
| Number of milliseconds that have passed since 1970-01-01T00:00:00. | |
| Time & | fromInt (LargeInteger timestamp) noexcept |
| Set the time from a timestamp. | |
| Time & | operator+= (LargeInteger millisecs) noexcept |
| Add milliseconds. | |
| Time & | operator-= (LargeInteger millisecs) noexcept |
| Subtract milliseconds. | |
| Time | operator+ (LargeInteger millisecs) noexcept |
| Add milliseconds. | |
| Time | operator- (LargeInteger millisecs) noexcept |
| Subtract milliseconds. | |
| LargeInteger | operator- (const Time &time) const noexcept |
| Subtract two times. | |
| int | getYear () const noexcept |
| Get the year. | |
| Time & | setYear (int year) noexcept |
| Set the year. | |
| int | getMonth () const noexcept |
| Get the month. | |
| Time & | setMonth (int month) noexcept |
| Set the month. | |
| int | getDay () const noexcept |
| Get the day. | |
| Time & | setDay (int day) noexcept |
| Set the day. | |
| int | getDayOfWeek () const noexcept |
| Get the day of the week. | |
| int | getHour () const noexcept |
| Get the hour. | |
| Time & | setHour (int hour) noexcept |
| Set the hour. | |
| int | getMinute () const noexcept |
| Get the minute. | |
| Time & | setMinute (int minute) noexcept |
| Set the minute. | |
| int | getSecond () const noexcept |
| Get the second. | |
| Time & | setSecond (int second) noexcept |
| Set the second. | |
| int | getMillisecond () const noexcept |
| Get the millisecond. | |
| Time & | setMillisecond (int millisecond) noexcept |
| Set the millisecond. | |
| String | toStr (bool utcTime) const noexcept |
| Format string conform to ISO8601. | |
| Time & | fromStr (const String &str, bool utcTime) noexcept |
| Set time object from an ISO8601 string. | |
Static Public Member Functions | |
| static void | milliSecondSleep (unsigned int msec) noexcept |
| Sleep in this thread for specified number of milliseconds. | |
| static Time | getLocalTime () noexcept |
| Returns a time object with local time. | |
| static Time | getUniversalTime () noexcept |
| Returns a time object with universal time. | |
| static LargeInteger | getTimeZoneMilliseconds () noexcept |
| Get time zone in milliseconds. | |
| static LargeInteger | toMilliseconds (LargeInteger days, LargeInteger hours, LargeInteger minutes, LargeInteger seconds, LargeInteger milliseconds) noexcept |
| Convert a time interval in milliseconds. | |
| static LargeInteger | daysFromMilliseconds (LargeInteger ms) noexcept |
| extract days from a time interval in milliseconds | |
| static LargeInteger | hoursFromMilliseconds (LargeInteger ms, bool remaining) noexcept |
| extract hours from a time interval in milliseconds | |
| static LargeInteger | minutesFromMilliseconds (LargeInteger ms, bool remaining) noexcept |
| extract minutes from a time interval in milliseconds | |
| static LargeInteger | secondsFromMilliseconds (LargeInteger ms, bool remaining) noexcept |
| extract seconds from a time interval in milliseconds | |
Time object.
Implements share-read / copy-on-write Api object over ITime.
|
inline |
Constructor from int as Timestamp with millis.
| [in] | year | Year |
| [in] | month | Month |
| [in] | day | Day |
| [in] | hour | Hour |
| [in] | minute | Minute |
| [in] | second | Second |
| [in] | millisecond | Millisecond |
|
inline |
Constructor from LargeInteger as timestamp in millis from 1970 ( epoch ).
| [in] | longTimeStamp | Timestamp in milliseconds |
|
default |
Default copy constructor.
| [in] | time | Time object to copy |
|
default |
Default move constructor noexcept is deduced.
| [in] | time | Time object to move |
|
inlinenoexcept |
Number of milliseconds that have passed since 1970-01-01T00:00:00.
|
inlinestaticnoexcept |
extract days from a time interval in milliseconds
| [in] | ms | Time interval in milliseconds |
|
inlinenoexcept |
Check if the date is empty value.
|
inlinenoexcept |
Set the time from a timestamp.
Timestamp is the number of milliseconds that have passed since 1970-01-01T00:00:00.
| [in] | timestamp | Timestamp in milliseconds |
Set time object from an ISO8601 string.
| [in] | str | ISO8601 string |
| [in] | utcTime | Time should be considered as UTC |
|
inlinenoexcept |
Get the day.
Valid values 1..31
|
inlinenoexcept |
Get the day of the week.
Valid values 1..7 (1 being Sunday).
|
inlinenoexcept |
Number of milliseconds that have passed since 1970-01-01T00:00:00.
|
inlinenoexcept |
Get the hour.
Valid values 0..23
|
inlinestaticnoexcept |
Returns a time object with local time.
|
inlinenoexcept |
Get the millisecond.
Valid values 0..999
|
inlinenoexcept |
Get the minute.
Valid values 0..59
|
inlinenoexcept |
Get the month.
Valid values 1..12
|
inlinenoexcept |
Get the second.
Valid values 0..59
|
inlinestaticnoexcept |
Get time zone in milliseconds.
|
inlinestaticnoexcept |
Returns a time object with universal time.
|
inlinenoexcept |
Get the year.
|
inlinestaticnoexcept |
extract hours from a time interval in milliseconds
| [in] | remaining | If true returns the hours less than 1 day, if false returns total hours |
| [in] | ms | Time interval in milliseconds |
|
inlinenoexcept |
Check if the date is valid.
|
inlinestaticnoexcept |
Sleep in this thread for specified number of milliseconds.
| [in] | msec | Number of milliseconds to sleep |
|
inlinestaticnoexcept |
extract minutes from a time interval in milliseconds
| [in] | remaining | If true returns the minutes less than 1 hour, if false returns total minutes |
| [in] | ms | Time interval in milliseconds |
|
inlinenoexcept |
Comparison operator not equal.
| [in] | rhs | Time object to compare |
|
inlinenoexcept |
Add milliseconds.
| [in] | millisecs | Milliseconds to add |
|
inlinenoexcept |
Add milliseconds.
| [in] | millisecs | Milliseconds to add |
|
inlinenoexcept |
Subtract two times.
| time | Time to subtract |
|
inlinenoexcept |
Subtract milliseconds.
| millisecs | Milliseconds to subtract |
|
inlinenoexcept |
Subtract milliseconds.
| millisecs | Milliseconds to subtract |
|
inlinenoexcept |
Comparison operator smaller.
| [in] | rhs | Time object to compare |
|
inlinenoexcept |
Comparison operator smaller or equal.
| rhs | Time object to compare |
Default move assignment noexcept is deduced.
| [in] | time | Time object to move |
|
inlinenoexcept |
Comparison operator equal.
| [in] | rhs | Time object to compare |
|
inlinenoexcept |
Comparison operator greater.
| [in] | rhs | Time object to compare |
|
inlinenoexcept |
Comparison operator greater or equal.
| rhs | Time object to compare |
|
inlinestaticnoexcept |
extract seconds from a time interval in milliseconds
| [in] | remaining | If true returns the seconds less than 1 minute, if false returns total seconds |
| [in] | ms | Time interval in milliseconds |
|
inlinenoexcept |
Set the day.
Valid values 1..31
| [in] | day | Day |
|
inlinenoexcept |
Set the hour.
Valid values 0..23
| [in] | hour | Hour |
|
inlinenoexcept |
Set this instance to local time.
|
inlinenoexcept |
Set the millisecond.
Valid values 0..999
| [in] | millisecond | Millisecond |
|
inlinenoexcept |
Set the minute.
Valid values 0..59
| [in] | minute | Minute |
|
inlinenoexcept |
Set the month.
Valid values 1..12
| [in] | month | Month |
|
inlinenoexcept |
Set the second.
Valid values 0..59
| [in] | second | Second |
|
inlinenoexcept |
Set this instance to universal time.
|
inlinenoexcept |
Set the year.
| [in] | year | Year |
|
inlinestaticnoexcept |
Convert a time interval in milliseconds.
| [in] | days | Days |
| [in] | hours | Hours |
| [in] | minutes | Minutes |
| [in] | seconds | Seconds |
| [in] | milliseconds | Milliseconds |