# format-date-to-week

> a plugin for formatting date to custom style ,like month, week, quarter

Latest version **1.0.2** (published 2017-10-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install format-date-to-week
pnpm add format-date-to-week
yarn add format-date-to-week
bun add format-date-to-week
```

## 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.2 |
| Published | 2017-10-31 |
| First published | 2017-10-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Lory Lee |
| Maintainers | tyhyly |
| Keywords | format date, to week, to month, to quarter |

## Links

- npm: https://www.npmjs.com/package/format-date-to-week
- Repository: https://github.com/tyhyly/formatdate
- Homepage: https://github.com/tyhyly/formatdate#readme
- Issues: https://github.com/tyhyly/formatdate/issues
- npm.io page: https://npm.io/package/format-date-to-week

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2017-10-31
- 1.0.1 — 2017-10-31

## README

# formatdate
format date to custom style, show one week, one quarter, etc. for example, format '2016-01-01' to '2016-01-01~2016-01-07'
### feature function

1、formatDateToWeek function
* input  "2016-01-01"
* output  "2016-01-01~2016-01-07"
* remarks: input time is starttime

2、formatDateToQuarter function
* input "2016-01-01"
* output "2016年Q1"

3、formatDateToMonth function
* input "2016-01-01"
* output "2016年01月"

### usage

import {formatDateToQuarter} from 'format-date-to-week';
```
let inputDate = '2016-01-01';
let outputDate = formatDateToQuarter(inputDate);
console.log(outputDate);// '2016年Q1'
```

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