@ilihub/second
TypeScript functions for converting second to other time units.
Installation
pnpm add @ilihub/second
npm install @ilihub/second
yarn add @ilihub/second
Usage
import { Second } from "@ilihub/second";
const second = new Second(60);
const milliseconds = second.toMillisecond();
console.log(milliseconds);
const minutes = second.toMinute();
console.log(minutes);
const hours = second.toHour();
console.log(hours);
const days = second.toDay();
console.log(days);
const weeks = second.toWeek();
console.log(weeks);
const months = second.toMonth();
console.log(months);
const years = second.toYear();
console.log(years);
const decades = second.toDecade();
console.log(decades);
const centuries = second.toCentury();
console.log(centuries);
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.