Date
Description
Provides native date utility.
API overview
Constructor
Date
(
inputValue: Number
=
)
Constructor optionally takes an integer that represents a desired Unix-Epoch time
Attributes
Public attributes
| date: Number |
An integer between 1 and 31 representing day of the month in local time |
| dateUTC: Number |
An integer between 1 and 31 representing day of the month in UTC |
| day: Number |
The day of the week, starting at 0 for Sunday, 1 for Monday, and continuing to 6 for Saturday in local time |
| dayUTC: Number |
The day of the week, starting at 0 for Sunday, 1 for Monday, and continuing to 6 for Saturday in UTC |
| hours: Number |
An integer between 0 and 23 representing the hour in local time |
| hoursUTC: Number |
An integer between 0 and 23 representing the hour in UTC |
| minutes: Number |
An integer between 0 and 59 representing the minute in local time |
| minutesUTC: Number |
An integer between 0 and 59 representing the minute in UTC |
| month: Number |
An integer between 0 and 11 representing the month in local time |
| monthUTC: Number |
An integer between 0 and 11 representing the month in UTC |
| seconds: Number |
An integer between 0 and 60 representing seconds in local time |
| secondsUTC: Number |
An integer between 0 and 60 representing seconds in UTC |
| year: Number |
The full Gregorian year in local time |
| yearUTC: Number |
The full Gregorian year in UTC |
Functions
Public functions
| formatTime ( format: String ): String |
native This function wraps the native strftime function from the ctime C++ library, which is used to get a string representation of the saved local time for details on formatting options |
| formatTimeUTC ( format: String ): String |
native This function wraps the native strftime function from the ctime C++ library, which is used to get a string representation of the saved UTC time |
| isLeapYear ( year: Number ): Boolean |
static native This helper function takes a Gregorian year and will output whether or not it is a leap year |
Constructor
Date ( inputValue: Number = )
Constructor optionally takes an integer that represents a desired Unix-Epoch time. This time will be used when populating the object, rather than the current time. @param inputValue Integer representing a desired Unix-Epoch time
Attributes
day: Number
The day of the week, starting at 0 for Sunday, 1 for Monday, and continuing to 6 for Saturday in local time
dayUTC: Number
The day of the week, starting at 0 for Sunday, 1 for Monday, and continuing to 6 for Saturday in UTC
seconds: Number
An integer between 0 and 60 representing seconds in local time. In the vast majority of cases the final second will be number 59, but leap seconds are accounted for with the 60th second
secondsUTC: Number
An integer between 0 and 60 representing seconds in UTC. In the vast majority of cases the final second will be number 59, but leap seconds are accounted for with the 60th second
Functions
formatTime ( format: String ): String
native
This function wraps the native strftime function from the ctime C++ library, which is used to get a string representation of the saved local time
for details on formatting options.
Parameters
| format: String | The format string to be passed into the native strftime function. See [C++ documentation](http://www.cplusplus.com/reference/ctime/strftime/) |
Returns
| String | A formatted string representing date information. |
formatTimeUTC ( format: String ): String
native
This function wraps the native strftime function from the ctime C++ library, which is used to get a string representation of the saved UTC time.
for details on formatting options.
Parameters
| format: String | The format string to be passed into the native strftime function. See [C++ documentation](http://www.cplusplus.com/reference/ctime/strftime/) |
Returns
| String | A formatted string representing date information. |
getFullTypeName
(): String
Inherited from Object
native
Gets the fully qualified type name of the Object. The fully qualified type name includes the package of the type.
Returns
| String | fully qualified type name of the Object. |
getType
(): Type
Inherited from Object
native
Gets the Type that describes the Object.
Returns
| Type | The Type that describes the object. |
getTypeName
(): String
Inherited from Object
native
Gets the type name of the Object.
Returns
| String | type name of the Object. |