Repository navigation
fix(Datetime): correct days in month calculation - #17558
Conversation
|
Hi there, Thanks for opening a PR! Would you be able to add a few tests to verify this fix? You can add them to the |
|
@liamdebeasi sure thing :) |
|
@liamdebeasi here it comes. some simply tests for the months of this year and february of the next leap year |
|
@liamdebeasi is there any internal agenda when you will merge these datetime prs? it is a little bit hard to keep them up to date and keep on track for external contributors 😉 |
|
I plan on merging this along with your other PR since it seems like the other PR is a pre-requisite. I will look at your other PR today. |
|
@liamdebeasi nice to hear that. let me know if you need something. |
|
Hey there, Is this PR still needed now that the other datetime PR has been merged in? Thanks! |
|
@liamdebeasi you can decide. this is using native JS Dates to get days in month and does not need a leapyear check :) or ifs if a month has 30 or 31 days. |
|
Ok cool! Does it fix any particular bug, or is it just more of a style thing? |
|
more of a style thing :) |
|
Ok make sense! What if we revert the changes to |
|
Feel free to only use the tests 😋 |
|
Thank you! 🎉 |
test(datetime): add daysInMonth tests (ionic-team#17558)
Short description of what this resolves:
Calculates the correct intial days in a month
Keep in mind this does not solve the issue, that valid dates are not recalculated after a month/year change (#17562)
Changes proposed in this pull request:
Ionic Version:
4.0.2
Fixes:
an issue as part of #16630: #17510 #16733