# time-date-formatter

> will return a formatted time and date by user request

Latest version **2.0.0** (published 2022-08-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install time-date-formatter
pnpm add time-date-formatter
yarn add time-date-formatter
bun add time-date-formatter
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-08-27 |
| First published | 2022-08-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tal Amit |
| Maintainers | tal.0311 |
| Keywords | Date, Time |

## Links

- npm: https://www.npmjs.com/package/time-date-formatter
- Repository: https://github.com/tal0311/time-date-package
- Homepage: https://github.com/tal0311/time-date-package#readme
- Issues: https://github.com/tal0311/time-date-package/issues
- npm.io page: https://npm.io/package/time-date-formatter

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2022-08-27

## README

# How to use

To deploy this project run

```bash
import getFormattedTime from './node_modules/time-date-formatter/index.js'
```

## Arguments

The function can accept 3 arrguments:

1. Date format [string]. requierd!
2. seperator [separator-optional] - will default to '/'
3. timeStamp [optional]. will default to 'Date.now()'.

```bash
  formatDateTime('Array')
  // formatDateTime('DD/MM/YYYY', [timeStamp])
// [ 'Sat', 'Jun', '04', '2022', '02:18:08' ]

formatDateTime('HH:MM', '/', 405122400000)
// formatDateTime('HH:MM', [separator-optional],[timeStamp])
// 02:18

formatDateTime('HH:MM:SS',':',405122400000)
// formatDateTime('HH:MM:SS', [separator-optional],[timeStamp])
// 02:18:08

formatDateTime('AM/PM', ':', 405122400000)
// 2:18:08 AM

formatDateTime('DD/MM/YYYY', '.', 405122400000)
// formatDateTime('DD/MM/YYYY', [separator-optional],[timeStamp])
// 4.6.2022
// 4/6/2022 default

formatDateTime('MM/DD/YYYY', 'K', 405122400000)
// formatDateTime('MM/DD/YYYY', [separator-optional], [timeStamp])
// 6k4k2022
// 6/4/2022 default

```

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