Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amaui-org/amaui-date
Time and date utils
https://github.com/amaui-org/amaui-date
amaui back-end backend browser date date-time front-end frontend javascript js library node nodejs time time-date typescipt typescript utils web
Last synced: about 2 months ago
JSON representation
Time and date utils
- Host: GitHub
- URL: https://github.com/amaui-org/amaui-date
- Owner: amaui-org
- License: mit
- Created: 2022-02-01T16:34:19.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-27T17:20:55.000Z (2 months ago)
- Last Synced: 2024-10-27T20:36:03.954Z (2 months ago)
- Topics: amaui, back-end, backend, browser, date, date-time, front-end, frontend, javascript, js, library, node, nodejs, time, time-date, typescipt, typescript, utils, web
- Language: TypeScript
- Homepage: https://docs.amaui.me/library/date
- Size: 345 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
amaui Date
Time and date utils library
MIT license
Production ready
min 2.4kb gzipped
100% test cov
Tree shakable
Browser and Nodejs
Very simple code
Modern code
Junior friendly
Typescript
Made with :yellow_heart:
#### Sizes
AmauiDate 2.4kb gzipped
AmauiDate with all the methods 5.6kb gzipped
AmauiDate with all the methods and all the timezones 22kb gzipped## Getting started
### Add
```sh
yarn add @amaui/date
```### Use
```javascript
import { AmauiDate, format } from '@amaui/date';// Make a new AmauiDate instance
// with an optional initial value
const amauiDate = new AmauiDate('2014-04-14T14:04:14.147');// Value
amauiDate.value;// a Date instance, Mon Apr 14 2014 14:04:14 GMT+0200 (Central European Summer Time)
// Format
// with various ways to add regular text and variables
format(amauiDate, `MM-DD-YYYY '🙂' HH:mm:ss.SSS`);// '04-14-2014 🙂 14:04:14.147'
```### Dev
Install
```sh
yarn
```Test
```sh
yarn test
```### Prod
Build
```sh
yarn build
```