iso_duration_parser
A package which parses ISO 8061 Duration (PnYnMnDTnHnMnS format).
1.1.1
9.1K downloads/mo
#3061 most downloaded on pub.dev
mzdm/iso_duration_parser
What this package is like to depend on
Last release 5 years ago
no release in 18 months
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 5 of 5 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
5 releases · first in 2021
0 releases in the last 12 months
see the full history below
Release timeline
5 releases · Feb 2021 to Jun 2021
2022
2023
2024
2025
2026
Releases
latest 5-
1.1.116 Jun 2021Release notes
Open source →1.1.1
- Constructor is now const.
- Updated docs & README.
- Updated tests.
- Updated CI.
Release notes
Open source →- Constructor is now const.
- Updated docs & README.
- Updated tests.
- Updated CI.
-
1.1.006 Apr 2021Release notes
Open source →1.1.0
withDatenow handles and supports UTCDateTime.formatnow supports years, months, weeks and days as well.- Added
inversemethod which makesIsoDurationpositive if it is negative and vice versa. - Updated README.
Release notes
Open source →withDatenow handles and supports UTCDateTime.formatnow supports years, months, weeks and days as well.- Added
inversemethod which makesIsoDurationpositive if it is negative and vice versa. - Updated README.
-
1.0.014 Mar 2021Release notes
Open source →- Added
toIsomethod which returns ISO 8601 Duration format from the IsoDuration object. - Added
withDatemethod which adds/subtractsIsoDurationfrom aDateTime
final isoDur = IsoDuration.parse('PT12H'); final dateTime = DateTime(2021, 1, 20, 8); // 2021-01-20 08:00:00.000 isoDur.withDate(dateTime); // 2021-01-20 20:00:00.000
- Added
formatmethod which formatsIsoDurationto specified String format
final durFormat = IsoDuration.parse('PT4H5M'); durFormat.format('See you in {hh}h {m}m'); // See you in 04h 5m
- Other added methods:
isAfter,isBefore,isAtSameMomentAs,isPrecise,hasDecimals,copyWith - Added a possibility to parse negative durations.
Minusoperator is allowed only before the literalP. An example:
-P1DT15H- Bug fixes.
- Updated dependencies.
Release notes
Open source →- Added
toIsomethod which returns ISO 8601 Duration format from the IsoDuration object. - Added
withDatemethod which adds/subtractsIsoDurationfrom aDateTime
final isoDur = IsoDuration.parse('PT12H'); final dateTime = DateTime(2021, 1, 20, 8); // 2021-01-20 08:00:00.000 isoDur.withDate(dateTime); // 2021-01-20 20:00:00.000- Added
formatmethod which formatsIsoDurationto specified String format
final durFormat = IsoDuration.parse('PT4H5M'); durFormat.format('See you in {hh}h {m}m'); // See you in 04h 5m- Other added methods:
isAfter,isBefore,isAtSameMomentAs,isPrecise,hasDecimals,copyWith - Added a possibility to parse negative durations.
Minusoperator is allowed only before the literalP. An example:
-P1DT15H- Bug fixes.
- Updated dependencies.
- Added
-
0.2.026 Feb 2021Release notes
Open source →- Added
toSecondsmethod for calculating total sum of all individual parts. - Improved pub.dev score.
- Renamed properties of
IsoDurationto differentiate from the Dart'sDuration.
Release notes
Open source →- Added
toSecondsmethod for calculating total sum of all individual parts. - Improved pub.dev score.
- Renamed properties of
IsoDurationto differentiate from the Dart'sDuration.
- Added
-
0.1.025 Feb 2021