Skip to main content

Holy Time

Type-safe date and time manipulation library for JavaScript and TypeScript

Quick start

Get up and running with Holy Time in seconds

1

Install the package

Install Holy Time using your favorite package manager:
npm install holy-time
2

Import and use

Start manipulating dates with a fluent, type-safe API:
import HolyTime from 'holy-time'

// Get the current time
const now = HolyTime.now()

// Chain operations fluently
const future = HolyTime
  .in(4, 'days')
  .add(2, 'weeks')
  .subtract(4, 'minutes')

// Check if it's the weekend
console.log(future.isWeekend())
3

Explore the API

Holy Time provides a comprehensive API for date manipulation, formatting, comparisons, and more. Check out the API Reference for full details.

Explore by topic

Learn how to work with dates and times in JavaScript

Time objects

Create and manipulate time instances with the HolyTime class

Durations

Calculate and format time durations between dates

Formatting

Display dates in any format with powerful formatting patterns

Timezones

Handle timezone conversions and UTC operations

Date manipulation

Add, subtract, and calculate differences between dates

Comparisons

Compare dates and check relationships

API reference

Complete API documentation for all classes and methods

HolyTime

Main class for date and time manipulation

HolyDuration

Class for working with time durations

Types

TypeScript type definitions and interfaces

Constants

Time units, timezone values, and other constants

Ready to get started?

Follow our quickstart guide to start building with Holy Time in minutes

Get Started

Build docs developers (and LLMs) love