day-name-finder
v1.0.2
Published
A simple package to get the day name from a given date.
Downloads
16
Maintainers
Readme
Day Name Finder
A simple npm package to return the name of the day (Monday, Tuesday, etc.) when a user enters a date.
Installation
npm install day-name-finderor
yarn add day-name-finderUsage
const getDayName = require("day-name-finder");
console.log(getDayName("2024-02-10")); // Output: "Saturday"
console.log(getDayName("2024-02-11")); // Output: "Sunday"Functionality
| Feature | Description | | -------------- | --------------------------------- | | Input | A date string (YYYY-MM-DD) | | Output | Corresponding day name | | Error Handling | Throws an error for invalid dates |
License
CodSplit
