time 2.1.6
time: ^2.1.6 copied to clipboard
Type-safe DateTime and Duration calculations, powered by extensions.
2.1.6 #
- Include
millisecondsandmicrosecondsintimeOfDayextension toDateTime
2.1.5 #
- Introduce
endOfDayextension toDateTime
2.1.4 #
- Introduce
shiftextension toDateTime
2.1.3 #
- Introduce
isWeekendextension toDateTime - Introduce
isWorkdayextension toDateTime
2.1.2 #
- Fix
minandmaxassertion withclampextension
2.1.1 #
- Introduce
firstDayOfWeekextension toDateTime - Introduce
lastDayOfWeekextension toDateTime - Introduce
firstDayOfMonthextension toDateTime - Introduce
lastDayOfMonthextension toDateTime - Introduce
firstDayOfYearextension toDateTime - Introduce
lastDayOfYearextension toDateTime - Introduce
clampextension toDateTime - Introduce
clampextension toDuration
2.1.0 #
- Introduce
package:clockdependency for more predictable testing
2.0.1 #
- Implement utc support for
copyWithoperation
2.0.0 #
- Migrate to null-safety
1.5.0-nullsafety.1 #
- Introduce
isAtSameYearAsextension toDateTime - Introduce
isAtSameMonthAsextension toDateTime - Introduce
isAtSameDayAsextension toDateTime - Introduce
isAtSameHourAsextension toDateTime - Introduce
isAtSameMinuteAsextension toDateTime - Introduce
isAtSameMillisecondAsextension toDateTime - Introduce
isAtSameMicrosecondAsextension toDateTime - Introduce
isLeapYearextension toDateTime - Introduce
daysInMonthextension toDateTime
final DateTime specificDate = DateTime(2021, 01, 01);
final DateTime otherDate = DateTime(2021, 02, 01);
print(specificDate.isAtSameYearAs(otherDate)); // true
print(specificDate.isAtSameMonthAs(otherDate)); // false
print(specificDate.isAtSameDayAs(otherDate)); // false
1.4.1 #
- Introduce
isAtSameYearAsextension toDateTime - Introduce
isAtSameMonthAsextension toDateTime - Introduce
isAtSameDayAsextension toDateTime - Introduce
isAtSameHourAsextension toDateTime - Introduce
isAtSameMinuteAsextension toDateTime - Introduce
isAtSameMillisecondAsextension toDateTime - Introduce
isAtSameMicrosecondAsextension toDateTime - Introduce
isLeapYearextension toDateTime - Introduce
daysInMonthextension toDateTime
1.5.0-nullsafety.0 #
- Migrated to null-safe dart
1.4.0 #
- Introduce
isTodayextension toDuration - Introduce
isTomorrowextension toDateTime - Introduce
wasYesterdayextension toDateTime
1.3.0 #
- Introduce
delayextension toDuration - Introduce
copyWithextension toDateTime
1.2.0 #
- Iterate through a
DateTimerange:
final DateTime start = DateTime(2019, 12, 2);
final DateTime end = start + 1.weeks;
final DateTime tuesday = start.to(end).firstWhere((date) => date.weekday == DateTime.tuesday);
1.1.1 #
- Fix breaking change from v1.1.0 by introducing @deprecated flag
1.1.0 #
- Breaking Change: renamed
latertofromNowto align with other ecosystems - Introduced support for other variants of
numi.edouble
1.0.0 #
- Named extensions to allow discoverability
- Introduced quality control test cases
0.0.1+1 #
- Unify extensions for int, Duration & DateTime
0.0.1 #
- Initial version