1.0.1 • Published 3 years ago

@akibrk/time v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Time

Utility functions for dealing with time

Release Notes

Read here

Usage

import { Time } from '@akibrk/time';

const oldDate = new Date(2022, 4, 21);
const fewMinsOld = new Date(2022, 5, 11, 12);
const futureDate = new Date(2022, 8, 1);

console.log(Time.getDurationFromCurrent(oldDate));
console.log(Time.getDurationFromCurrent(fewMinsOld));
console.log(Time.getDurationFromCurrent(futureDate));
console.log(Time.formatDuration(Time.getDurationFromCurrent(fewMinsOld)));