diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e591f4..7826e51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,22 @@ +## 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` + +```dart +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` diff --git a/pubspec.yaml b/pubspec.yaml index 3ef7d6b..a57b4c1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: time description: Type-safe DateTime and Duration calculations, powered by extensions. -version: 1.4.0 +version: 1.4.1 homepage: https://github.com/jogboms/time.dart author: Jogboms