1.0.0 • Published 1 year ago

uld v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

uld - User local Date

npm version npm downloads npm downloads size Docs

A fast small utility to convert a date to a user-local date.

image

Usage

Install package:

# npm
npm install uld

# yarn
yarn install uld

# pnpm
pnpm install uld

Import:

// ESM
import { dateConverter } from 'uld'
const { year, month, day, hour, minute, second,localDate } = dateConverter(new Date()) //you can use any date ethier as a string or a data object

// CommonJS
const { dateConverter } = require('uld')
const { year, month, day, hour, minute, second, localDate } = dateConverter(new Date()) //you can use any date ethier as a string or a data object

// use the any of the above variables to display the date to your user in their local timezone
Propusagetypedefault
dateThe original date to be convertedstring or Dateundefined
localThe language of the output date (optional)string'en'

💻 Development

  • Clone this repository
  • Enable Corepack using corepack enable (use npm i -g corepack for Node.js < 16.10)
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

License

Made with 💛

Published under MIT License.

1.0.0

1 year ago

0.3.5-next.0

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago