# date-formatter

> date formatter

Latest version **0.1.1** (published 2015-12-11) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2015-12-11 |
| First published | 2015-12-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | niris |
| Maintainers | niris |
| Keywords | date, datetime, format |

## Links

- npm: https://www.npmjs.com/package/date-formatter
- Repository: https://github.com/dhcmrlchtdj/node-date-formatter
- Homepage: https://github.com/dhcmrlchtdj/node-date-formatter#readme
- Issues: https://github.com/dhcmrlchtdj/node-date-formatter/issues
- npm.io page: https://npm.io/package/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

- 0.1.1 (latest) — 2015-12-11
- 0.1.0 — 2015-12-03

## README

# date formatter

[![license][license-image]][license-url]
[![ci][ci-image]][ci-url]
[![coverage][coverage-image]][coverage-url]
[![version][version-image]][version-url]
[![download][download-image]][download-url]



## install

```
$ npm install --save date-formatter
```



## example

```js
var df = require('date-formatter');
var s = df(
    new Date(2015, 0, 2, 3, 4, 5, 6),
    'YYYY-MM-DDThh:mm:ss.S'
);
console.log(s); // '2015-01-02T03:04:05.6'
```



## format

```
YYYY = four-digit year

MM   = two-digit month (01 = January, etc.)
DD   = two-digit day of month (01 through 31)
M    = one-digit month (1 = January, etc.)
D    = one-digit day of month (1 through 31)

hh   = two digits of hour (00 through 23)
mm   = two digits of minute (00 through 59)
ss   = two digits of second (00 through 59)
h    = one digits of hour (0 through 23)
m    = one digits of minute (0 through 59)
s    = one digits of second (0 through 59)

S    = one or more digits representing a decimal fraction of a second
O    = time zone designator (Z or +hh:mm or -hh:mm)
```



## test

```
$ npm test
```



## license

MIT



[license-image]: https://img.shields.io/npm/l/date-formatter.svg?style=flat-square
[license-url]: http://opensource.org/licenses/MIT
[ci-image]: https://img.shields.io/travis/dhcmrlchtdj/node-date-formatter.svg?style=flat-square
[ci-url]: https://travis-ci.org/dhcmrlchtdj/node-date-formatter
[coverage-image]: https://img.shields.io/coveralls/dhcmrlchtdj/node-date-formatter.svg?style=flat-square
[coverage-url]: https://coveralls.io/r/dhcmrlchtdj/node-date-formatter
[version-image]: https://img.shields.io/npm/v/date-formatter.svg?style=flat-square
[version-url]: https://www.npmjs.com/package/date-formatter
[download-image]: https://img.shields.io/npm/dm/date-formatter.svg?style=flat-square
[download-url]: https://www.npmjs.com/package/date-formatter

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