DevJourney · code I wrote while learning
Worksheet 2
10 items- 1. Function to check whether an `input` is a date object or not using the “is_date” function—
- 2. Write a JavaScript function to get the current date—
- 3. Write a JavaScript function to get the number of days in a month—
- 4. Write a JavaScript function to get the month name from a particular date—
- 5. Write a JavaScript function to compare dates (i.e. greater than, less than or equal to)—
- 6. Write a JavaScript function to test whether a date is a weekend—
- 7. Write a JavaScript function to get the difference between two dates in days—
- 8. Write a JavaScript function to get the last day of a month—
- 9. Write a JavaScript function to calculate 'yesterday's day—
- 10. Write a JavaScript function to get the maximum date from an array of dates—