@garrigarrison/datetime
v1.0.9
Published
converter DateTime into timestamp and revert
Downloads
4
Readme
DateTime for convert timestamp and reverse
Converting date and time to timestamp and reverse converting
function toTimestamp
input date format: YYYY-MM-DD, DD.MM.YYYY, hh:mm, YYYY-MM-DDThh:mm, YYYY-MM-DD hh:mm, DD.MM.YYYYThh:mm, DD.MM.YYYY hh:mm output result timestamp with timezone
toDateString
input timestamp output date format DD.MM.YYYY or null
toISODateString
input timestamp output date format YYYY-MM-DD or null
toDateLongString
input timestamp output date format DD month YYYY or null
toISOString
input timestamp, withSeconds = true withSeconds = true (default): output date format YYYY-MM-DDThh:mm:ss or null withSeconds = false: output date format YYYY-MM-DDThh:mm or null
toDateTimeString
input timestamp, withSeconds = true withSeconds = true (default): output date format DD.MM.YYYY hh:mm:ss or null withSeconds = false: output date format DD.MM.YYYY hh:mm or null
toTimeString
input timestamp, withSeconds = true withSeconds = true (default): output date format hh:mm:ss or null withSeconds = false: output date format hh:mm or null