hb-date-utils

1.0.6 • Public • Published

HealthBeats Date Utils package

Uses only native Intl JS date-time functions with no dependencies on other external packages.

Date formatting:

Dates are return in the format 'DD Mmm YYYY'. E.g. 15 Jan 2020

With time formatting:

Optional parameter Accepts 'hh:mm' / 'hh:mm:ss' / 'hh:mm a' / 'hh:mm:ss a'. 'hh:mm' returns time in 24 hr format. E.g. 17:35 'hh:mm a' returns time in meridiem format. E.g. 05:35 PM / 05:35 AM

With timezone:

Optional paramter Accepts timezone to offset time accordingly.

Various other utility functions

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i hb-date-utils

      Weekly Downloads

      0

      Version

      1.0.6

      License

      ISC

      Unpacked Size

      5.59 kB

      Total Files

      3

      Last publish

      Collaborators

      • healthbeats-npm