https://github.com/phocks/isit
https://github.com/phocks/isit
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/phocks/isit
- Owner: phocks
- Created: 2024-10-17T04:40:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-17T23:09:42.000Z (over 1 year ago)
- Last Synced: 2025-03-01T08:45:19.693Z (over 1 year ago)
- Language: TypeScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# isit
A simple function to check if it is a certain day of the week.
## Usage
Install with `deno add jsr:@phocks/isit` or `npx jsr add @phocks/isit`.
```ts
import { isit } from "@phocks/isit";
isit("Friday") ? "Hooray!" : "Boo!";
```
## Options
You can offset the timezone and also pass in a Date.
```ts
isit("Friday", { offsetHours: 10, when: new Date("2021-01-01") });
```
## Notes
Might add other things like `isit("morning")` or `isit("weekend")` in the future.
## License
MIT
## Author
[Joshua Byrd](https://bne.social/@phocks)