Date¶
Definition¶
Extends¶
Extended By¶
None
Description¶
A representation of year month and day as a Date.
Method Summary¶
Owner | Name | Return Type | Description |
---|---|---|---|
Date | constructor(value) | Object | Initialize a Date object. |
Date | constructor(value) | Object | Initialize a Date object. |
Object | getClassName() | String | Returns the string name of this object's class type. |
Date | getDay() | Integer | Returns the day of month value |
Date | getDayOfWeek() | Integer | Returns the day of week value |
Date | getDays() | Integer | Returns the number of days since epoch day of this date object. |
Date | getFirstDayOfMonth() | Date | Returns the first day of the date object's month as a date object |
Date | getLastDayOfMonth() | Date | Returns the last day of the date object's month as a date object |
Date | getMonth() | Integer | Returns the month of year value |
Date | getYear() | Integer | Returns the year value |
Date | isWeekday() | Boolean | Returns true if the current date is a weekday |
Date | isWeekend() | Boolean | Returns true if the current date is a weekend |
Object | toJson() | String | Returns a string of a json representation of this object. |
Date | toLegibleDayOfWeek() | String | Returns the day of week formatted string of the date object |
Date | toLegibleMonth() | String | Returns the month formatted string of the date object |
Date | toLegibleString() | String | Returns the yyyyMMdd formatted string of the date object |
Method Definitions¶
constructor(value)¶
Date date = new Date(String value)
Description¶
Initialize a Date object.
Parameter Definition¶
Name | Type | Description |
---|---|---|
value | String | a yyyyMMdd string value |
Example 1¶
constructor(value)¶
Date date = new Date(Integer value)
Description¶
Initialize a Date object.
Parameter Definition¶
Name | Type | Description |
---|---|---|
value | Integer | number of days since epoch day |
Example 1¶
getClassName()¶
Description¶
Returns the string name of this object's class type.
getDay()¶
Description¶
Returns the day of month value
getDayOfWeek()¶
Description¶
Returns the day of week value
getDays()¶
Description¶
Returns the number of days since epoch day of this date object.
Example 1¶
getFirstDayOfMonth()¶
Date Date::getFirstDayOfMonth()
Description¶
Returns the first day of the date object's month as a date object
getLastDayOfMonth()¶
Date Date::getLastDayOfMonth()
Description¶
Returns the last day of the date object's month as a date object
getMonth()¶
Description¶
Returns the month of year value
getYear()¶
Description¶
Returns the year value
isWeekday()¶
Description¶
Returns true if the current date is a weekday
isWeekend()¶
Description¶
Returns true if the current date is a weekend
toJson()¶
Description¶
Returns a string of a json representation of this object.
toLegibleDayOfWeek()¶
String Date::toLegibleDayOfWeek()
Description¶
Returns the day of week formatted string of the date object
Example 1¶
toLegibleMonth()¶
Description¶
Returns the month formatted string of the date object
Example 1¶
toLegibleString()¶
String Date::toLegibleString()
Description¶
Returns the yyyyMMdd formatted string of the date object