You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
don't work correctly. It gets the next month and subtracts one microsecond, which ends up doing nothing on the web.
Example: If d is a DateTime representing 2024-01-05T23:52, then d.endOfMonth results in 2024-02-01T00:00:00, rather than the expected 2024-01-31T23:59:59.999.
Also, using local time by default (by constructing a new DateTIme not in utc), is probably a bad choice. If my original DateTime was in UTC, this will give incorrect results.
The text was updated successfully, but these errors were encountered:
The web's DateTime object does not support microseconds, so calculations like the one done for
endOfMonth
:dart_date/lib/src/dart_date.dart
Line 404 in 2162d45
don't work correctly. It gets the next month and subtracts one microsecond, which ends up doing nothing on the web.
Example: If
d
is aDateTime
representing 2024-01-05T23:52, thend.endOfMonth
results in2024-02-01T00:00:00
, rather than the expected2024-01-31T23:59:59.999
.Also, using local time by default (by constructing a new DateTIme not in utc), is probably a bad choice. If my original DateTime was in UTC, this will give incorrect results.
The text was updated successfully, but these errors were encountered: