Methods
(static) addTimezoneOffset(date) → {*}
Parameters:
Name | Type | Description |
---|---|---|
date |
Returns:
- Type
- *
(static) formatDate(date, formatopt) → {*}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
date |
|||
format |
<optional> |
Returns:
- Type
- *
(static) formatDateIfValid(date, formatopt) → {*}
Returns formatted date if valid otherwise returns original value
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
date |
|||
format |
<optional> |
Returns:
- Type
- *
(static) formatDateTime(date, formatopt) → {*}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
date |
|||
format |
<optional> |
Returns:
- Type
- *
(static) formatDateTimeMessage(date, formatopt) → {String}
Formats and returns message based on date provided and current date, e.g. 'a few seconds ago', '2 years ago' etc.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
date |
date instance |
||
format |
<optional> |
Returns:
formatted message
- Type
- String
(static) formatDateToCalendar(date, formatopt) → {*}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
date |
in string |
||
format |
<optional> |
Returns:
- Type
- *
(static) getDate(date) → {Date}
Returns a date object, using either the native Date constructor or Moment.js, depending on the configuration.
Parameters:
Name | Type | Description |
---|---|---|
date |
string | Date | undefined | The input date to convert. |
Returns:
- The formatted date object.
- Type
- Date
(static) getDateFormat() → {string|*|properties.dateFormat|Object|fields.dateFormat|Object}
Returns:
- Type
- string | * | properties.dateFormat | Object | fields.dateFormat | Object
(static) getDateTimeFormat() → {*|string}
Returns:
- Type
- * | string
(static) isDateCell(cell) → {Boolean}
Parameters:
Name | Type | Description |
---|---|---|
cell |
Returns:
- Type
- Boolean
(static) isValidDate(date) → {*}
Parameters:
Name | Type | Description |
---|---|---|
date |
Returns:
- Type
- *
(static) parseDate(value, formatopt) → {*}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
value |
|||
format |
<optional> |
Returns:
- Type
- *
(static) parseDateTime(value, formatopt) → {*}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
value |
|||
format |
<optional> |
Returns:
- Type
- *