Skip to content

Azorant/Time

Repository files navigation

@azorant/time

import { fromDuration, fromTimestamp, toDuration, toTimestamp } from '@azorant/time';

const timestampMs = fromTimestamp('1:30'); // 90,000
const timestamp = toTimestamp(50022000); // 13:53:42
const durationMS = fromDuration('1d 4h 30m'); // 102,600,000
const duration = toDuration(1324060000); // 2w 1d 7h 47m 40s

About

Simple package to parse to and from timestamps and duration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors