CalculatorsLesson 170Free preview
Add or Subtract Days
This lesson is part of Web Developer Tools · All levels
Summary
The Add or Subtract Days tool adds or subtracts a number of days, weeks, months, or years from a date. For days, the addition can automatically exceed the month and year limits. For the month, results can be adjusted if the target date is not available, for example 31 January plus one month to the end of February.
Key points
- Adding days can automatically pass the end of months and years
- The new moon needs a rule of clamping for the 29-31
- The year of the equinox affects the result of the addition of days
- Save the date as a pure date without clock
- Check the results with a calendar, not a 30-day assumption.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.