# dateformater-plus

> 提供了格式化时间、获取开始和结束时间相关的功能

Latest version **1.0.1** (published 2023-08-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install dateformater-plus
pnpm add dateformater-plus
yarn add dateformater-plus
bun add dateformater-plus
```

## 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.1 |
| Published | 2023-08-18 |
| First published | 2023-08-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | afatpig |
| Keywords | 时间格式化, dateFormat, begintime, endtime |

## Links

- npm: https://www.npmjs.com/package/dateformater-plus
- npm.io page: https://npm.io/package/dateformater-plus

## 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.1 (latest) — 2023-08-18
- 1.0.0 — 2023-08-18

## README

## 安装
```
npm install date-formater
```

## 导入
```
在根组件或者main.js中，将方法绑定到Date的原型上
import dateFormaterPlus from 'dateFormater-plus'
window.Date.prototype.pattern=dateFormater.pattern
window.Date.prototype.getTimeRange=dateFormater.getTimeRange
```

## 格式化时间
```
const timeStr=new Date().pattern('yyyy-MM-dd E HH:mm:ss')
```

## 获取开始/结束时间数组
```
const timeArr=new Date().getTimeRange('week')
const timeArr=new Date('2021-08-01').getTimeRange('year')
......
```

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