3.0.0 • Published 12 days ago

datie v3.0.0

Weekly downloads
5
License
WTFPL
Repository
github
Last release
12 days ago

🗓 Datie

Small template string based date formatter for the browser and Node.js.

Follows https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table with the inclusion of o suffix to enable eg. 1st, 2nd etc.

Usage

Datie takes the format as a tagged template function and then returns a function which accepts the date or a new Date compatible string.

import datie from 'datie'

const string = "2020-05-13T08:34:30.911Z"
const date = new Date(string)

datie`d/M-y hh:mm`(string) // 13/5-2020 08:34

// or

datie`d/M-y hh:mm`(date) // 13/5-2020 08:34
3.0.0

12 days ago

2.0.1

12 months ago

2.0.0

2 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago