duration_iso_parser 0.1.0+1 copy "duration_iso_parser: ^0.1.0+1" to clipboard
duration_iso_parser: ^0.1.0+1 copied to clipboard

Package to parse a duration from ISO 8601 string (like P1M, PT15M, P2Y3W4DT5H).

duration_iso_parser #

pub package Analyze & Test innim lint

Package for parsing ISO 8601 durations string to the Duration object.

For now it's not support negative values and decimal fraction.

Features #

Parse string of duration in ISO 8601 format and get Duration object.

For year used 365 days and for month - 30 days.

Getting started #

Add duration_iso_parser as a dependency in your pubspec.yaml file.

Usage #

const parser = DurationParser();

final duration = parser.parse('P2W');
print(duration); // 336:00:00.000000
2
likes
160
points
16
downloads

Publisher

verified publisherinnim.ru

Weekly Downloads

Package to parse a duration from ISO 8601 string (like P1M, PT15M, P2Y3W4DT5H).

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on duration_iso_parser