Skip to content

Commit

Permalink
Use isLeapYear from time
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasWanke committed Jun 8, 2022
1 parent 883523a commit 8a3555e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/utils/week.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:meta/meta.dart';
import 'package:time/time.dart';

import '../utils.dart';

Expand All @@ -12,7 +13,6 @@ extension DateTimeWeekInfoRrule on DateTime {
return offsets[month - 1] + day;
}

bool get isLeapYear => year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
int get daysInYear => isLeapYear ? 366 : 365;
}

Expand Down

0 comments on commit 8a3555e

Please sign in to comment.