# simple-date-formatter

> ## 安装

Latest version **1.0.2** (published 2023-01-04) · ISC license · 0 weekly downloads

## Install

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

## 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 | 2023-01-04 |
| First published | 2023-01-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Brandon |
| Maintainers | brandon-zbd |
| Keywords | time, date, formatter |

## Links

- npm: https://www.npmjs.com/package/simple-date-formatter
- npm.io page: https://npm.io/package/simple-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

- 1.0.2 (latest) — 2023-01-04
- 1.0.1 — 2023-01-04
- 1.0.5 — 2023-01-04

## README

# 时间格式化工具

## 安装

`npm i simple-date-formatter`

## 使用

`import { formateDate } from "simple-date-formatter";`

`formateDate( time: Date, formate: string = 'Y年Mon月D日')`

传入两个参数，第一个为 Date 格式的时间，第二个为格式化方式，可结合占位符自由组合；默认为 `Y年Mon月D日`

### 占位符

Y:年

Mon:月

D:日

H:时

Min:分

S:秒

### eg：

```
formateDate(new Date(), 'Y年Mon月D日')
// 2023年1月4日
```

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