@garrigarrison/datetime
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

DateTime for convert timestamp and reverse

Converting date and time to timestamp and reverse converting

npm npm Coverage Status Build Status Minified Size

License: MIT

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

Dependencies (0)

    Dev Dependencies (18)

    Package Sidebar

    Install

    npm i @garrigarrison/datetime

    Weekly Downloads

    0

    Version

    1.0.9

    License

    MIT

    Unpacked Size

    12.2 kB

    Total Files

    8

    Last publish

    Collaborators

    • garrigarrison