Methods
(inner) fromString(string) → {Date}
- Source:
Lenient date parser.
Parameters:
Name | Type | Description |
---|---|---|
string |
string | Date in a reasonable format. |
Throws:
-
If the date couldn't be parsed.
- Type
- Error
Returns:
- Type
- Date
(inner) fromStringDMY(string) → {Date}
- Source:
Create a Date object based on a string in the format 'dd/MM/yyyy'
Parameters:
Name | Type | Description |
---|---|---|
string |
string | with a date in the format 'dd/MM/yyyy' |
Returns:
- Type
- Date
(inner) isDate(string) → {Boolean}
- Source:
Check if a string can be converted to a valid date.
Parameters:
Name | Type | Description |
---|---|---|
string |
string | String to check. |
Returns:
- Type
- Boolean
(inner) isToday(date) → {Boolean}
- Source:
Check if a date object represents the current day
Parameters:
Name | Type | Description |
---|---|---|
date |
Date |
Returns:
- Type
- Boolean
(inner) toStringDMY(Date) → {string}
- Source:
Converts a date to string in the format 'dd/MM/yyyy'
Parameters:
Name | Type | Description |
---|---|---|
Date |
Date | object |
Returns:
- Type
- string