https://github.com/jaimeloeuf/datetime-ts
A date time library that just works.
https://github.com/jaimeloeuf/datetime-ts
date datetime iso8601 time timestamp typescript unix unixtimestamp
Last synced: 3 months ago
JSON representation
A date time library that just works.
- Host: GitHub
- URL: https://github.com/jaimeloeuf/datetime-ts
- Owner: Jaimeloeuf
- Created: 2025-05-18T18:59:20.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2025-05-18T18:59:28.000Z (5 months ago)
- Last Synced: 2025-06-26T16:17:19.308Z (3 months ago)
- Topics: date, datetime, iso8601, time, timestamp, typescript, unix, unixtimestamp
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/datetime-ts
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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.```typescript
// 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
```typescript
import { DateTime } from "datetime-ts";console.log(DateTime.now.asIsoDate())
```