| Summary: | Remove duplicate isLeapYear | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | Web Template Framework | Assignee: | Ahmad Saleem <ahmad.saleem792> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | ap, bfulgham, rniwa, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
|
Description
Ahmad Saleem
2023-01-18 15:54:54 PST
Yes! Use the one in WTF/DateMath.h and delete the other one. It would be nice to move other generic functions as well, and unify duplicates (like daysInMonths in ISO8601.cpp). But that would be a much larger effort. static int maxDayOfMonth(int year, int month) static int dayOfWeek(int year, int month, int day) (In reply to Alexey Proskuryakov from comment #2) > It would be nice to move other generic functions as well, and unify > duplicates (like daysInMonths in ISO8601.cpp). But that would be a much > larger effort. > > static int maxDayOfMonth(int year, int month) > static int dayOfWeek(int year, int month, int day) Should I create a bug for future? (In reply to Brent Fulgham from comment #1) > Yes! Use the one in WTF/DateMath.h and delete the other one. Happy to do PR. :-) > Should I create a bug for future?
I personally wouldn't bother (refactoring ideas don't usually get acted on), but it wouldn't be unreasonable to do if you feel like it.
(In reply to Alexey Proskuryakov from comment #5) > > Should I create a bug for future? > > I personally wouldn't bother (refactoring ideas don't usually get acted on), > but it wouldn't be unreasonable to do if you feel like it. Not in near future (few weeks), still learning few bits around WebKit but in few months, I can explore it as a challenge. I will add it in my To-do Notes. :-) Committed 259080@main (0b9c23b10f38): <https://commits.webkit.org/259080@main> Reviewed commits have been landed. Closing PR #8806 and removing active labels. |