fn-date-range

1.0.3 • Public • Published

FN Date Range

How does it work?

  • No string manipulation. Calculation is based on MS

Return Type

// Date Format: DayName MonthName Date Year --->>> Tue May 07 2024
["Tue May 07 2024", "Wed May 08 2024", "Thu May 09 2024", ..., "Thu May 16 2024", "Fri May 17 2024"];

Installation

npm i fn-date-range
  • Signature

(end: number, start: number = 0) => string[];
  • Usage

import getDatesInRange from 'fn-date-range';

// dates of the next 90 days
const tomorrow = getDatesInRange(90);

// dates of the last 30 days
const past = getDatesInRange(0, -30);

// dates of the last 30 and next 90 days
const range = getDatesInRange(90, -30);

License

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.30latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i fn-date-range

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

1.53 kB

Total Files

3

Last publish

Collaborators

  • furkannarin