refactored and condensed technical documentation and comments across the codebase to improve readability
This commit is contained in:
@@ -23,11 +23,9 @@ extension IsSameDay on DateTime {
|
||||
bool isSameOrAfter(DateTime other) => isSameDateTime(other) || isAfter(other);
|
||||
}
|
||||
|
||||
/// Calendar-aware day arithmetic. `DateTime.add(Duration(days: n))` adds
|
||||
/// `n * 24h` of real-world time, which on local DateTimes silently drifts by
|
||||
/// ±1h across DST transitions — so 7 days from "Monday 00:00 CEST" before a
|
||||
/// DST fall-back lands at "Sunday 23:00 CET", shifting the entire next week
|
||||
/// onto the wrong calendar day. [addDays]/[subtractDays] normalize through
|
||||
/// Calendar-aware day arithmetic. `DateTime.add(Duration(days: n))` adds real
|
||||
/// time that drifts ±1h across DST, shifting a whole week onto the wrong
|
||||
/// calendar day. [addDays]/[subtractDays] normalize through
|
||||
/// `DateTime(year, month, day + n)` so the wall-clock fields stay fixed.
|
||||
extension CalendarDayArithmetic on DateTime {
|
||||
DateTime addDays(int days) => DateTime(
|
||||
|
||||
Reference in New Issue
Block a user