Actually it is possible to create invalid dates like Feb 30 or Jun 31 but I feel it is not really worth the effort to "fix" that. Introducing the number of days per month is easy but then come leap years, someone with a date like Jan 30, moving Jan to Feb (and 30 becomes invalid).
My suggestion is not to bother about that.
Edit: LOL you're quick, my pull request was already merged before I finished typing this message :-)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@Gordon Thanks for the patch to add wrapping.
Unfortunately there is one issue with it. You cannot select 31 as a date.
Here's a pull request to fix that: https://github.com/espruino/BangleApps/pull/490
Actually it is possible to create invalid dates like Feb 30 or Jun 31 but I feel it is not really worth the effort to "fix" that. Introducing the number of days per month is easy but then come leap years, someone with a date like Jan 30, moving Jan to Feb (and 30 becomes invalid).
My suggestion is not to bother about that.
Edit: LOL you're quick, my pull request was already merged before I finished typing this message :-)