1.2.5 • Published 7 years ago

date-strings v1.2.5

Weekly downloads
4
License
MIT
Repository
github
Last release
7 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

7 years ago

1.2.4

8 years ago

1.2.3

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago