what-is-today
v1.0.4
Published
Lightweight and no dependencies package to check what day is today.
Downloads
1
Maintainers
Readme
what-is-today
Lightweight and no dependencies package to check what day is today.
Bundle size: 500B minified, 306B minified + gzipped
Bundlephobia link
Documentation
import { isToday } from 'what-is-today';
isToday('Tuesday'); // returns true/false
The day is not case sensitive an you could also pass 'TUESDAY' or 'tuesday'.
If you don't pass a valid day, it will return the string No valid day was given.
import { todayIs } from 'what-is-today';
todayIs(); // returns tuesday (or whatever the day is)
JSX:
{isToday('Wednesday') ? 'I should work' : 'Get some rest!'}
Contributing
Contributions are always welcome!