@akibrk/time
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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)));

Package Sidebar

Install

npm i @akibrk/time

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

10.2 kB

Total Files

15

Last publish

Collaborators

  • akibrk