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