# recentlyjs

> 依赖dayjs的一个列举距当前日期最近具体是哪些天、哪些月的js插件

Latest version **0.0.5** (published 2020-04-15) · ISC license · 0 weekly downloads

## Install

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

## 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.0.5 |
| Published | 2020-04-15 |
| First published | 2020-01-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | yanyi9399@outlook.com |
| Maintainers | yanyi24 |
| Keywords | dayjs, recently, lastDate, lastMonth, js, plugin, echarts |

## Links

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

## Dependencies (1)

- [dayjs](https://npm.io/package/dayjs.md) ^1.8.19

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.5 (latest) — 2020-04-15
- 0.0.4 — 2020-04-15
- 0.0.3 — 2020-04-06
- 0.0.2 — 2020-04-06
- 0.0.1 — 2020-01-19

## README

## recentlyjs

>  依赖dayjs的一个列举距当前日期最近具体是哪些天、哪些月的js插件（持续更新中...）

### 下载

`npm i recentlyjs -S  `

### 引入

`import { lastDates, lastMonth } from 'recentlyjs';`

### 使用

```javascript
const daysArr = lastDates(30[, options]) // 最近30天
const monthArr = lastMonth(6[, options]) // 最近6个月
```

### 参数options

```javascript
options = {
	// 分隔符, 日期数字之间的连接符
	divider: {
		type: String,
		required: fales,
		default: '-'
	},
	// 结束时间点
	datePoint: { 
		type: String | Date | timeStamp,
		required: fales,
		default: new Date() // 当前时间
	}
}
```

### DEMO展示

![demo.gif](http://yanyi24.cn/storage/demo.gif)

### CHANGELOG

```v0.0.4: 去掉lodash，修改lastDates当开始时间跟结束时间是同一个月份时的BUG，现在最近天数可以是任意```

```v0.0.5: 修改lastMonth的BUG```

### github

<https://github.com/yanyi24/recently.git>

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