@ilihub/millisecond
TypeScript functions for converting millisecond to other time units.
Installation
pnpm add @ilihub/millisecond
npm install @ilihub/millisecond
yarn add @ilihub/millisecond
Usage
import { Millisecond as MillisecondClass } from "@ilihub/millisecond";
const millisecond = 3153600000000;
const Millisecond = new MillisecondClass(millisecond);
const century = Millisecond.toCentury();
console.log(century);
const decade = Millisecond.toDecade();
console.log(decade);
const year = Millisecond.toYear();
console.log(year);
const month = Millisecond.toMonth();
console.log(month);
const week = Millisecond.toWeek();
console.log(week);
const day = Millisecond.toDay();
console.log(day);
const hour = Millisecond.toHour();
console.log(hour);
const minute = Millisecond.toMinute();
console.log(minute);
const second = Millisecond.toSecond();
console.log(second);
Available Functions and Classes
Support the development of new open-source projects from ilihub through crowdfunding.
The core of ilihub is our crowd-funded open-source projects, licensed under the permissive MIT license. Sponsorship increases the rate of bug fixes, documentation improvements, and feature development.