Methods
(static) dates.dateToDdMmYyyy(date, separatornullable) → (nullable) {string}
Formats a javascript Date to a string formatted as DD-MM-YYYY.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
date |
Date | a javascript |
|
separator |
string |
<nullable> |
a separator that will be inserted between the date parts. |
Returns:
a string formatted as DD-MM-YYYY.
- Type
- string
(static) dates.dateToYyyyMmDd(date, separatornullable) → (nullable) {string}
Formats a javascript Date to a string formatted as YYYY-MM-DD.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
date |
Date | a javascript |
|
separator |
string |
<nullable> |
a separator that will be inserted between the date parts. |
Returns:
a string formatted as YYYY-MM-DD.
- Type
- string
(static) dates.ddMmYyyyToDate(str) → (nullable) {Date}
Initializes a javascript Date from a string or number formatted as DDMMYYYY.
Parameters:
| Name | Type | Description |
|---|---|---|
str |
string | number | a string or number formatted as DDMMYYYY. |
Returns:
a javascript Date.
- Type
- Date
(static) dates.yyyyMmDdToDate(str) → (nullable) {Date}
Initializes a javascript Date from a string or number formatted as YYYYMMDD.
Parameters:
| Name | Type | Description |
|---|---|---|
str |
string | number | a string or number formatted as YYYYMMDD. |
Returns:
a javascript Date.
- Type
- Date