DateTime¶
The DateTime object represents date and time.
classDiagram
direction LR
DateTime --> TimeDifference
class TimeDifference{
}
class DateTime{
string iso8601
TimeDifference timeDifference
string date
string dateLong
string dateShort
int timeInSeconds
int day
int dayOfYear
int month
string monthName
string monthNameShort
int week
string weekday
string weekdayShort
int weekdayDigit
int year
int timestamp
int hours
int minutes
int seconds
string time
string timeShort
string dateTimeLong
string dateTime
string dateTimeShort
}
It is possible to render the datetime by rendering the object directly.
Properties¶
Attribute name | Type | Description |
---|---|---|
iso8601 | string |
The ISO 8601 formatted time string |
timeDifference | TimeDifference |
The TimeDifference object that represents the difference between 2 moments in time. |
date | string |
Formatted date |
longDate | string |
Formatted long date |
shortDate | string |
Formatted short date |
timeInSeconds | int |
Date representation in seconds (the same as timestamp) converted using shop's timezone |
day | int |
Day number in month (from 1 to 31) |
dayOfYear | int |
Day number in year (from 1 to 366) |
month | int |
Month number in year (from 1 to 12) |
monthName | string |
Month name |
monthNameShort | string |
Month short name |
week | int |
Week number in year (from 1 to 53) |
weekday | string |
Weekday name |
weekdayShort | string |
Weekday short name |
weekdayDigit | int |
Weekday digit (from 1 as monday to 7 as sunday) |
year | int |
Year |
timestamp | int |
Date representation in seconds converted using shop's timezone |
hours | int |
Number of hours |
timestamp | int |
Number of minutes (from 0 to 59) |
timestamp | int |
Number of seconds (from 0 to 59) |
time | string |
Formatted value of time |
timeShort | string |
Formatted value of time without seconds |
dateTimeLong | string |
Formatted value of time without seconds |
dateTime | string |
Formatted value of time without seconds |
dateTimeShort | string |
Formatted value of time without seconds |