# uld

> A fast utility to convert date to user local time

Latest version **1.0.0** (published 2023-05-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install uld
pnpm add uld
yarn add uld
bun add uld
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-05-01 |
| First published | 2022-08-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mzaien |

## Links

- npm: https://www.npmjs.com/package/uld
- Repository: https://github.com/mzaien/uld
- Homepage: https://github.com/mzaien/uld#readme
- Issues: https://github.com/mzaien/uld/issues
- npm.io page: https://npm.io/package/uld

## Recent versions

- 1.0.0 (latest) — 2023-05-01
- 0.3.5-next.0 (next) — 2022-09-29
- 0.3.4 — 2022-09-26
- 0.3.3 — 2022-09-24
- 0.3.2 — 2022-09-24
- 0.3.1 — 2022-09-24
- 0.3.0 — 2022-09-24
- 0.2.1 — 2022-08-30
- 0.2.0 — 2022-08-30
- 0.1.0 — 2022-08-29

## README

# uld - User local Date

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![npm downloads size][npm-downloads-size]][npm-downloads-size]
[![Docs](https://paka.dev/badges/v0/cute.svg)](https://paka.dev/npm/uld)

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

![image](https://banners.beyondco.de/ULD.png?theme=dark&packageManager=npm+install&packageName=uld&pattern=ticTacToe&style=style_2&description=User+local+date+done+easily&md=1&showWatermark=0&fontSize=150px&images=calendar&widths=350&heights=350)
## Usage

Install package:

```sh
# npm
npm install uld

# yarn
yarn install uld

# pnpm
pnpm install uld
```

Import:

```js
// 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
```
| Prop      |                                                     usage                                                     | type    |             default             |
| :-------- | :-----------------------------------------------------------------------------------------------------------: | ------- | ------- |
| date      | The original date to be converted | string or Date  | undefined |
| local | The language of the output date (optional)| string | 'en' |
## 💻 Development

- Clone this repository
- Enable [Corepack](https://github.com/nodejs/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](./LICENSE).

<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/uld?style=flat-square
[npm-version-href]: https://npmjs.com/package/uld

[npm-downloads-src]: https://img.shields.io/npm/dm/uld?style=flat-square
[npm-downloads-href]: https://npmjs.com/package/uld
[npm-downloads-size]: https://img.shields.io/bundlephobia/minzip/uld

---
_Source: https://npm.io/package/uld · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
