Skip to main content
Deno 2 is finally here 🎉️
Learn more

Human Time

Simplified time-related types, data structures, and functions for Deno.

This package may be replaced by Temporal APIs and new Intl APIs when they become available in all environments.

Example

From example.ts:

import { Day, Duration } from "https://deno.land/x/human_time@0.2.1/mod.ts";

console.log(`Today is ${new Day()}`);

console.log(
  new Duration({ days: 7 })
    .toString({ units: ["weeks"] }), // "1w"
);

Modules

Local Development

git clone git@github.com:pskfyi/human-time.git
cd human-time

With Deno installed:

deno run example.ts
deno test . # unit testing
deno lint   # linting
deno fmt    # formatting

About