1.6.5 • Published 4 years ago

drivetribe-date-formatters v1.6.5

Weekly downloads
9
License
ISC
Repository
github
Last release
4 years ago

drivetribe-date-formatters

Collection of date formatter functions to format ISO dates for display purposes.

Install

Install the module directly from npm:

npm install drivetribe-date-formatters --save

Formatters

Relative Date

Converts ISO date or Unix timestamp to a relative date like "just now" or "5 days ago".

relativeDate(date: number||string): string

Convert seconds to duration

Converts a time, given in seconds, to a human-readable duration in the HH:MM:SS format.

convertSecondsToDuration(seconds: number): string

Time format

Converts ISO date or Unix timestamp to the next time format: HH:MMpm/am according to user timezone.

formatTime(date: number||string): string

1.6.5

4 years ago

1.5.5

6 years ago

1.5.4

6 years ago

1.4.4

6 years ago

1.4.3

6 years ago

1.4.2

6 years ago