Installation
Get started with Holy Time by installing it via your preferred package manager.Package Managers
Holy Time has zero dependencies, so the installation is lightweight and fast.
Importing the Library
Once installed, you can import Holy Time in your project:Available Exports
Holy Time exports the following:HolyTime(default export) - The main class for date/time manipulationHolyDuration- Class for working with time durationsTimeResolvable(type) - AcceptsHolyTime,Date,number, orstringHumanUnit(type) - Time units:'milliseconds','seconds','minutes','hours','days','weeks','months','years'IntervalUnit(type) - Singular time units for intervalsTimeZone(type) - Valid timezone strings
TypeScript Configuration
Ensure TypeScript is configured
Holy Time is written in TypeScript and includes type definitions out of the box. Make sure your
tsconfig.json is properly configured:tsconfig.json
Enable strict mode (recommended)
For the best type safety experience, enable strict mode in your TypeScript configuration:
tsconfig.json
Module Formats
Holy Time supports both CommonJS and ES Modules:- ES Module:
./dist/index.mjs - CommonJS:
./dist/index.js - TypeScript Types:
./dist/index.d.ts
Verification
Verify your installation by running a simple test:test.ts
Next Steps
Quickstart Guide
Learn how to use Holy Time with practical examples