A date time library that just works.
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.
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())
import { DateTime } from "datetime-ts";
console.log(DateTime.now.asIsoDate())