time 1.4.1 copy "time: ^1.4.1" to clipboard
time: ^1.4.1 copied to clipboard

outdated

Type-safe DateTime and Duration calculations, powered by extensions.

1.4.1 #

  • Introduce isAtSameYearAs extension to DateTime
  • Introduce isAtSameMonthAs extension to DateTime
  • Introduce isAtSameDayAs extension to DateTime
  • Introduce isAtSameHourAs extension to DateTime
  • Introduce isAtSameMinuteAs extension to DateTime
  • Introduce isAtSameMillisecondAs extension to DateTime
  • Introduce isAtSameMicrosecondAs extension to DateTime
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.0 #

  • Introduce isToday extension to Duration
  • Introduce isTomorrow extension to DateTime
  • Introduce wasYesterday extension to DateTime

1.3.0 #

  • Introduce delay extension to Duration
  • Introduce copyWith extension to DateTime

1.2.0 #

  • Iterate through a DateTime range:
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 later to fromNow to align with other ecosystems
  • Introduced support for other variants of num i.e double

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
345
likes
40
pub points
93%
popularity

Publisher

verified publisherogbomo.com

Type-safe DateTime and Duration calculations, powered by extensions.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on time