js-date-to-string
Version:
Converts js dates to meaningful strings
17 lines (13 loc) • 347 B
Markdown
A small and lightweight library for calculating elapsed time in JavaScript.
```
npm i js-date-to-string
```
```js
// current date is 2022-07-27 1:30:00
const someDate = new Date('2022-07-27T02:00:00');
const dateToString = jsDateToString(someDate);
console.log(dateToString); // expected result => 30m
```