1.2.5 • Published 6 years ago

date-strings v1.2.5

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

date-strings

Simple zero dependancy client or server package for finding out how long ago in English a Date object was.

import ds from 'date-strings';

const date = new Date('2017-09-01T09:54:05.216Z');
const dateString = ds(date);

const response = `Event took place on ${dateString.when}, ${dateString.ago.strings.long} ago`;
// Event took place on 1 Sep 10:54, 4 weeks 1 day

build

Date Strings is written in modern es7, but uses babel to transpile npm build

tests

npm test

1.2.5

6 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago