https://github.com/dkunin/date-streak
Fiddle with date streaks
https://github.com/dkunin/date-streak
Last synced: 30 days ago
JSON representation
Fiddle with date streaks
- Host: GitHub
- URL: https://github.com/dkunin/date-streak
- Owner: DKunin
- Created: 2017-09-30T19:48:56.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-07T21:43:52.000Z (almost 9 years ago)
- Last Synced: 2025-07-08T12:05:23.027Z (about 1 year ago)
- Language: JavaScript
- Size: 33.2 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Date Streak
For now only one function, which determines if you are currently on a streak of dates, and the length of the last streak.
```
import { determineStreak } from 'date-streak';
determineStreak([
today,
yesterday,
twoDaysAgo,
threeDaysAgo,
fourDaysAgo,
fiveDaysAgo,
sixDaysAgo,
sevenDaysAgo
]) // { isCurrentlyOnStreak: true, lengthOfTheLastStreak: 8 }
```