isDaylightSaving property
bool
get
isDaylightSaving
Indicates whether this date-time is in daylight saving time.
Example:
final summer = ZonedDateTime.of(
LocalDateTime.of(2023, 7, 15, 12, 0),
ZoneId.of('America/New_York')
);
final winter = ZonedDateTime.of(
LocalDateTime.of(2023, 1, 15, 12, 0),
ZoneId.of('America/New_York')
);
print('Summer DST: ${summer.isDaylightSaving}'); // true
print('Winter DST: ${winter.isDaylightSaving}'); // false
Implementation
bool get isDaylightSaving => _isDaylightSaving;