mirror of
https://github.com/Myzel394/quid_faciam_hodie.git
synced 2025-06-19 15:45:26 +02:00
19 lines
405 B
Dart
19 lines
405 B
Dart
extension DateExtensions on DateTime {
|
|
bool isSameDay(final DateTime other) {
|
|
return year == other.year && month == other.month && day == other.day;
|
|
}
|
|
|
|
DateTime asNormalizedDate() => DateTime(
|
|
year,
|
|
month,
|
|
day,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
);
|
|
DateTime asNormalizedDateTime() =>
|
|
DateTime(year, month, day, hour, minute, 0, 0, 0);
|
|
}
|