datetime-ts
v1.0.0
Published
A date time library that just works
Maintainers
Readme
datetime-ts
A date time library that just works.
Usage
This library lets you use the utility either by importing or running a side effect to set $DateTime utility on globalThis so that it can be used anywhere in your codebase.
Use as global value (default)
All global values have the $ prefix.
// In your root entry file
// import module for side effect (makes this available globally)
import "datetime-ts";
// Any file in your codebase without any import
console.log($DateTime.now.asIsoDate())Use as module import
import { DateTime } from "datetime-ts";
console.log(DateTime.now.asIsoDate())