Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tak-iwamoto/ptera
Ptera is DateTime library for Deno
https://github.com/tak-iwamoto/ptera
date datetime deno time typescript
Last synced: 3 days ago
JSON representation
Ptera is DateTime library for Deno
- Host: GitHub
- URL: https://github.com/tak-iwamoto/ptera
- Owner: Tak-Iwamoto
- License: mit
- Created: 2021-05-08T16:40:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-02T10:46:52.000Z (6 months ago)
- Last Synced: 2024-12-30T05:45:22.650Z (6 days ago)
- Topics: date, datetime, deno, time, typescript
- Language: TypeScript
- Homepage:
- Size: 307 KB
- Stars: 77
- Watchers: 1
- Forks: 8
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ptera
[![ci](https://github.com/Tak-Iwamoto/ptera/actions/workflows/ci.yml/badge.svg)](https://github.com/Tak-Iwamoto/ptera/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)Ptera is DateTime library for Deno.
Fully Written in Deno.
Heavily inspired by the great libraries
[Luxon](https://github.com/moment/luxon),
[Day.js](https://github.com/iamkun/dayjs),
[Moment.js](https://github.com/moment/moment).## Features
- Immutable, chainable
- Parsing and Formatting
- Timezone and Intl support## Getting Started
### API
```typescript
import { datetime } from "https://deno.land/x/ptera/mod.ts";datetime("2021-06-30T21:15:30.200");
// timezone
datetime().toZonedTime("Asia/Tokyo");// locale
datetime().setLocale("fr");// add, subtract
datetime().add({ year: 1 });
datetime().subtract({ day: 1 });
```### Documentation
https://tak-iwamoto.github.io/ptera/