Methods
formatPythonDate(dateObj, formatStr) → {string}
Formats a Date object using a Python-style strftime specifier string (%d, %m, %Y, %H, %M, %S).
Parameters:
| Name | Type | Description |
|---|---|---|
dateObj |
Date | The UTC Date object to format. |
formatStr |
string | Format pattern (e.g. "%d%m%Y%H%M%S"). |
- Source:
Returns:
Formatted date/time string.
- Type
- string
parsePythonDate(str, formatStr) → {Date|null}
Parses a string formatted according to a Python-style strptime format pattern into a UTC Date object.
Parameters:
| Name | Type | Description |
|---|---|---|
str |
string | Raw date/time string. |
formatStr |
string | Format pattern (e.g. "%d%m%Y%H%M"). |
- Source:
Returns:
Parsed UTC Date object or null if parsing fails/invalid date.
- Type
- Date | null