Skip to content

Commit

Permalink
chore: prepare for release v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Maistho committed Jul 30, 2023
1 parent 85e20f3 commit 9884d8f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# [2.2.0](https://github.com/KadaDev/week_of_year/tree/v2.2.0) (2023-07-30)

Add a function `dateTimeFromWeekNumber()` which can be used to create a DateTime from year, ISO week number and an optional week day.

# [2.1.0](https://github.com/KadaDev/week_of_year/tree/v2.1.0) (2023-07-28)

Update dart version constraint to allow dart 3
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Fast dependency-free extension methods to get the ISO 8601 week of year from a dart DateTime object.

Also includes a function to create a DateTime from a year and week number.

```dart
import 'package:week_of_year/week_of_year.dart';
Expand All @@ -10,5 +12,8 @@ void main() {
print(date.weekOfYear); // Get the iso week of year
print(date.ordinalDate); // Get the ordinal date
print(date.isLeapYear); // Is this a leap year?
final DateTime dateFromWeekNumber = dateTimeFromWeekNumber(2023, 13, DateTime.tuesday);
print(dateFromWeekNumber); // 2023-02-28
}
```
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: week_of_year
description: Adds extension method to get the ISO 8601 week of year from a date
version: 2.1.0
version: 2.2.0
homepage: https://github.com/KadaDev/week_of_year
repository: https://github.com/KadaDev/week_of_year
issue_tracker: https://github.com/KadaDev/week_of_year/issues
Expand Down

0 comments on commit 9884d8f

Please sign in to comment.