https://github.com/idimetrix/pro-date
A lightweight date utility class for parsing, formatting, and manipulating dates.
https://github.com/idimetrix/pro-date
Last synced: 6 months ago
JSON representation
A lightweight date utility class for parsing, formatting, and manipulating dates.
- Host: GitHub
- URL: https://github.com/idimetrix/pro-date
- Owner: idimetrix
- License: other
- Created: 2024-09-23T07:42:07.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-09-23T08:32:43.000Z (8 months ago)
- Last Synced: 2024-12-01T03:39:46.406Z (6 months ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/pro-date
- Size: 88.9 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# **pro-date** • [**Documentation**](https://github.com/idimetrix/pro-date/blob/main/docs/classes/ProDate.md)
A lightweight date utility class for parsing, formatting, and manipulating dates.
## Installation
You can install the package using **npm**, **yarn**, or **pnpm**.
```bash
pnpm add pro-dateyarn install pro-date
npm install pro-date
```## Usage
```tsx
import { ProDate } from "pro-date";const parsedDate = ProDate.parse("2023-09-24 14:30", "YYYY-MM-DD HH:mm");
console.log(parsedDate); // Outputs: ProDate { date: Sun Sep 24 2023 14:30:00 }
```## tsup
Bundle your TypeScript library with no config, powered by esbuild.
https://tsup.egoist.dev/
## How to use this
1. install dependencies
```
# pnpm
$ pnpm install# yarn
$ yarn install# npm
$ npm install
```2. Add your code to `src`
3. Add export statement to `src/index.ts`
4. Test build command to build `src`.
Once the command works properly, you will see `dist` folder.```zsh
# pnpm
$ pnpm run build# yarn
$ yarn run build# npm
$ npm run build
```5. Publish your package
```zsh
$ npm publish
```## test package
https://www.npmjs.com/package/pro-date