# mini-formater

> a simple javascript date format function

Latest version **1.0.0** (published 2020-03-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install mini-formater
pnpm add mini-formater
yarn add mini-formater
bun add mini-formater
```

## 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 | 1.0.0 |
| Published | 2020-03-10 |
| First published | 2020-03-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | m_alghobary |
| Maintainers | m_alghobary |
| Keywords | date, format |

## Links

- npm: https://www.npmjs.com/package/mini-formater
- Repository: https://github.com/m-alghobary/mini-formater
- Homepage: https://github.com/m-alghobary/mini-formater#readme
- Issues: https://github.com/m-alghobary/mini-formater/issues
- npm.io page: https://npm.io/package/mini-formater

## 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

- 1.0.0 (latest) — 2020-03-10

## README

# mini-formater

a small and simple package for javascrip date formatting.

---

## Install

using NPM:

```
npm install mini-formater
```

---

## Usage

```javascript
const format = require('mini-formater');

const date = new Date('12-3-2020');
const result = format(date, 'mmm dd yyyy');

console.log(result); // Dec 03 2020
```

---

### Supported formats

| Format | Description                                   |
| ------ | --------------------------------------------- |
| d      | the date day as a single digit                |
| dd     | the date day as two digit                     |
| m      | the date month as a single digit              |
| mm     | the date month two digit                      |
| mmm    | the date month shortcut name (ex: 'Oct, Dec') |
| mmmm   | the date month full name                      |
| yy     | the date year as two digits                   |
| yyyy   | the date full year                            |

---

### Supported separators

separators are used to separate date parts:
| Separator | Example
|-----------|----------------
|' ' space | '12 Oct 2019
|'-' dash | '12-Oct-2019
|'/' slash | '12/Oct/2019

---

## License: MIT

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