# wanshengwei

> 格式化时间的包

Latest version **1.0.0** (published 2022-09-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install wanshengwei
pnpm add wanshengwei
yarn add wanshengwei
bun add wanshengwei
```

## 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 | 2022-09-16 |
| First published | 2022-09-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | tkmimo |
| Keywords | wanshengwei, dataformat, date |

## Links

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

## 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.0 (latest) — 2022-09-16

## README

## 安装

```js
npm i bagba

```
## 引入
```js
const dataformat = require('bagba');

```

## 格式化时间分使用
```js
function format(){
    const dt = new Date();
    const y = dt.getFullYear();
    const m = dt.getMonth()+1;
    const d = dt.getDate();

    const h = dt.getHours();
    const c = dt.getMinutes();
    const s = dt.getSeconds();
    return `${y}-${m}-${d}-${h}-${c}-${s}`

}
function zero(n){
    return n < 10 ? '0' + n : n;
}

module.exports = {
    format
}
```


##
```js
开源许可协议 ISC

```

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