# date-formatter-js

> date-formatter-js

Latest version **1.0.0** (published 2020-10-26) · ISC license · 0 weekly downloads

## Install

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

## 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-10-26 |
| First published | 2020-10-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | colin |
| Maintainers | colintaochen |

## Links

- npm: https://www.npmjs.com/package/date-formatter-js
- npm.io page: https://npm.io/package/date-formatter-js

## Recent versions

- 1.0.0 (latest) — 2020-10-26

## README

# date-formatter-js

Format the date as yyyy-MM-dd hh:mm:ss or yyyy/MM/dd hh:mm:ss or yyyy-MM-dd or yyyy/MM/dd or hh:mm:ss

# install

npm install date-formatter-js --save

# github

https://github.com/ColinTChen/date-formatter-is.git

# usage

### import

import { getQuarter, dateFormat, getMonthFirstDay, getMonthLastDay, getMonthDays, getMonthDateArr, getDateArr } from "date-formatter-js"

### description

#### 1.getQuarter -- Get quarter

##### parameter

Date or yyyy-MM-dd or yyyy/MM/dd or timestamp, default new Date().

#### 2.dateFormat -- Format date

##### parameter

parameter one：Date or yyyy-MM-dd or yyyy/MM/dd or timestamp, default new Date().
parameter two：Date format to be returned, default yyyy-MM-dd.

#### 3.getMonthFirstDay -- Get the first day of the month

##### parameter

parameter one：Date or yyyy-MM-dd or yyyy/MM/dd or timestamp, default new Date().
parameter two：Date format to be returned, default yyyy-MM-dd.

#### 4.getMonthLastDay -- Get the last day of the month

##### parameter

parameter one：Date or yyyy-MM-dd or yyyy/MM/dd or timestamp, default new Date().
parameter two：Date format to be returned, default yyyy-MM-dd.

#### 5.getMonthDays -- Get days of the month

##### parameter

Date or yyyy-MM-dd or yyyy/MM/dd or timestamp, default new Date().

#### 6.getMonthDateArr -- Get array of the first day of month and the last day of month

##### parameter

parameter one：Date or yyyy-MM-dd or yyyy/MM/dd or timestamp, default new Date().
parameter two：Date format to be returned, default yyyy-MM-dd.

#### 7.getDateArr -- Get array of the date of a few days ago and now

##### parameter

parameter one：step, default 6, the array of nearly a week.
parameter two：Date format to be returned, default yyyy-MM-dd.

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