npm.io
1.2.2 • Published 4 years ago

js-date-to-string

Licence
MIT
Version
1.2.2
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
1

Introduction

A small and lightweight library for calculating elapsed time in JavaScript.

Installation

npm i js-date-to-string

Usage

// 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

Keywords