Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4670b6e0 authored by Neil Fuller's avatar Neil Fuller Committed by android-build-merger
Browse files

Merge "Fix incorrect leap year logic" am: ca13216b am: ef56b49d

am: 1e1e1488

Change-Id: Ib7ad577c83a1ff7fe65d6534a9acb70d3d01f912
parents b9cba444 1e1e1488
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -581,7 +581,7 @@ class DatePickerCalendarDelegate extends DatePicker.AbstractDatePickerDelegate {
        return DatePicker.class.getName();
    }

    public static int getDaysInMonth(int month, int year) {
    private static int getDaysInMonth(int month, int year) {
        switch (month) {
            case Calendar.JANUARY:
            case Calendar.MARCH:
@@ -597,7 +597,7 @@ class DatePickerCalendarDelegate extends DatePicker.AbstractDatePickerDelegate {
            case Calendar.NOVEMBER:
                return 30;
            case Calendar.FEBRUARY:
                return (year % 4 == 0) ? 29 : 28;
                return ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) ? 29 : 28;
            default:
                throw new IllegalArgumentException("Invalid Month");
        }