what-is-today

Lightweight and no dependencies package to check what day is today.

Usage no npm install needed!

<script type="module">
  import whatIsToday from 'https://cdn.skypack.dev/what-is-today';
</script>

README

what-is-today

Licence NPM

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!

Authors

@tpliakas