# @noshufu/datejs

> [datejs gitHub链接](https://github.com/tuvs85/datejs) ### datejs Api #### format >格式化时间，为最后链，如果不传指定格式为原对象返回。 > >YYYY 年 > >MM 月 > >DD 日 > >hh 小时 > >mm 分钟 > >ss 秒 > >SSS 毫秒 > ```javascript window.dateJs(new Date().getTime()).format('YYYY-M

Latest version **0.1.3** (published 2020-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @noshufu/datejs
pnpm add @noshufu/datejs
yarn add @noshufu/datejs
bun add @noshufu/datejs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2020-12-08 |
| First published | 2020-11-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | shufu |
| Maintainers | tuvs85 |
| Keywords | datejs, date format |

## Links

- npm: https://www.npmjs.com/package/@noshufu/datejs
- Repository: https://github.com/tuvs85/datejs
- Homepage: https://github.com/tuvs85/datejs#readme
- Issues: https://github.com/tuvs85/datejs/issues
- npm.io page: https://npm.io/package/@noshufu/datejs

## Dependencies (1)

- [rollup-plugin-filesize](https://npm.io/package/rollup-plugin-filesize.md) ^9.0.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2020-12-08
- 0.1.2 — 2020-12-08
- 0.1.1 — 2020-12-07
- 0.1.0 — 2020-12-07
- 0.0.9 — 2020-11-29
- 0.0.8 — 2020-11-14
- 0.0.7 — 2020-11-12
- 0.0.6 — 2020-11-12
- 0.0.5 — 2020-11-12
- 0.0.4 — 2020-11-11
- 0.0.3 — 2020-11-10
- 0.0.2 — 2020-11-08
- 0.0.1 — 2020-11-07

## README

[datejs gitHub链接](https://github.com/tuvs85/datejs)
### datejs Api
#### format
>格式化时间，为最后链，如果不传指定格式为原对象返回。
>
>YYYY 年
>
>MM 月
>
>DD 日
>
>hh 小时
>
>mm 分钟
>
>ss 秒
>
>SSS 毫秒
>
```javascript
window.dateJs(new Date().getTime()).format('YYYY-MM-DD hh-mm-ss');
```

####  toZone
> 转换时间到指定时区，默认认为东八区为正时区 因此需要反推  -8 为正 8 
```javascript
window.dateJs(new Date().getTime()).toZone(12).format('YYYY-MM-DD hh-mm-ss');
```

#### stamp
> 返回当前时间的时间戳

#### add
> 添加指定时间
> day  天
>
> hour 小时
>
> minute 分钟
>
> second 秒速
>
```javascript
window.dateJs(new Date().getTime()).add(12);
window.dateJs(new Date().getTime()).add({hour:12, minute: 12});

```

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