🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@ilihub/month

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ilihub/month

TypeScript functions for converting month to other time units.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

@ilihub/month

TypeScript functions for converting month to other time units.

NPM Version NPM CodeFactor Socket Badge

Installation

# if you're using pnpm
pnpm add @ilihub/month

# or, if you're using npm
npm install @ilihub/month

# or, if you're using yarn
yarn add @ilihub/month

Usage

import { Month } from "@ilihub/month";

const month = new Month(1);

const milliseconds = month.toMillisecond();
console.log(milliseconds); // 2629800000

const seconds = month.toSecond();
console.log(seconds); // 2629800

const minutes = month.toMinute();
console.log(minutes); // 43830

const hours = month.toHour();
console.log(hours); // 720

const days = month.toDay();
console.log(days); // 30

const weeks = month.toWeek();
console.log(weeks); // 4

const years = month.toYear();
console.log(years); // 0.08333333333333333

const decades = month.toDecade();
console.log(decades); // 0.008333333333333333

const centuries = month.toCentury();
console.log(centuries); // 0.0008333333333333333

Available Functions and Classes

Sponsors & Backers

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.

Sponsors

Keywords

ilihub

FAQs

Package last updated on 01 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts