Skip to content

Commit

Permalink
release v0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-virkus committed Aug 1, 2021
1 parent a76d778 commit febdf33
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.6.0
- Adds the `IsoDuration.toDuration()` conversion method

## 0.5.0
- Convert a recurrence rule to human readbable text using `recurrence.toHumanReadableText()`.
With a recurrence of `RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=1SU,-1SU`, `recurrence.toHumanReadableText()` results in
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ Please file feature requests and bugs at the [issue tracker][tracker].
[tracker]: https://github.com/Enough-Software/enough_icalendar/issues

## Related Projects
* Use [enough_icalendar_export](https://pub.dev/packages/enough_icalendar_export) to export calendar invites to the native calendar
* Check out [enough_mail_icalendar](https://pub.dev/packages/enough_mail_icalendar) for handling calendar invites in emails

## Null-Safety
Expand Down
11 changes: 11 additions & 0 deletions lib/src/types.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,17 @@ class IsoDuration {
return buffer.toString();
}

/// Converts this ISO duration to an approximate Dart duration.
///
/// The `days` are converted by assuming 365 days per year and 30 days per month: `days: years * 365 + months * 30 + weeks * 7 + days`
Duration toDuration() {
return Duration(
days: years * 365 + months * 30 + weeks * 7 + days,
hours: hours,
minutes: minutes,
seconds: seconds);
}

/// Parses the given [textValue] into a duration.
///
/// The formmat is defined as `P[n]Y[n]M[n]DT[n]H[n]M[n]S`
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: enough_icalendar
description: iCalendar library to parse, generate and respond to iCal / ics invites. Fully compliant with RFC 5545 (iCalendar) and RFC 5546 (iTIP).
version: 0.5.0
version: 0.6.0
homepage: https://github.com/Enough-Software/enough_icalendar

environment:
Expand Down

0 comments on commit febdf33

Please sign in to comment.