# pzy-time

> is time

Latest version **1.0.3** (published 2020-11-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install pzy-time
pnpm add pzy-time
yarn add pzy-time
bun add pzy-time
```

## 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.3 |
| Published | 2020-11-24 |
| First published | 2020-11-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | misspei |
| Maintainers | chinapei |
| Keywords | time |

## Links

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

## 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.3 (latest) — 2020-11-24
- 1.0.1 — 2020-11-24
- 1.0.0 — 2020-11-24

## README

* 时间处理函数

   > 用于处理10位时间戳和13位时间戳，提供两种返回格式和可自定义返回格式。


* 使用方法
    ```
        
        npm i pzy-time -S 
        
        import { timeSecond } from 'pzy-time'
  
        let time = timeSecond(1606188973) //  返回2020-02-02 12:05:59
       
        let time1 = timeSecond(1606188973,0) //  返回2020-02-02 12:05:59
       
        let time2 = timeSecond(1606188973,1) //  返回2020年02月02日 12时05分59秒
       
        let time3 = timeSecond(1606188973,2,{year: 'xx', month: 'zz', day: 'cc', hours: 'vv', minute: 'bb', second: 'nn'}) //  返回2020xx02zz02cc 12vv05bb59nn
    
    ```
  
* 参数
        
    |  参数（）  | 类型  |  是否必填 | 备注|
    |  ----  | ----  | ----  | ----  |
    | 0  | string、number | true | 10位或13位时间戳
    | 1  | number | false | 只允许 0 、1 、2
    | 2  | json、string | false| 当第二位值为2时，此值为必填

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