# my-time-bag

> 提供了格式化时间、获取年、获取毫秒功能

Latest version **1.0.0** (published 2023-02-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install my-time-bag
pnpm add my-time-bag
yarn add my-time-bag
bun add my-time-bag
```

## 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 | 2023-02-09 |
| First published | 2023-02-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | wang04102 |
| Keywords | init-time, getime |

## Links

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

## Recent versions

- 1.0.0 (latest) — 2023-02-09

## README

## 安装 
```
npm install my-time-bag

```


## 导入
```
const time = require('my-time-bag')

```


## 使用init()实例化对象
```
// 不加参数默认实例化当前时间   参数格式 xxxx-xx-xx xx:xx
let item = time.init();
// 结果  2023-02-09 17:20:58
```


## 通过实例对象获取年、时间戳
```
//年
item.gery()  // 2023
//时间戳
item.getms()  //不加参数得到的是实例化对象的时间戳
item.getms('2023-02-10 00:00')  //得到指定时间的时间戳
```


## 开源协议
ISC

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