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

Package to parse a duration from ISO 8601 string.

example/main.dart

// ignore_for_file: avoid_print
import 'package:duration_iso_parser/duration_iso_parser.dart';

void main() {
  const parser = DurationParser();

  print(parser.parse('P2W')); // 336:00:00.000000
  print(parser.parse('P1Y2M4D')); // 10296:00:00.000000
  print(parser.parse('P2DT11H')); // 59:00:00.000000
  print(parser.parse('P1WT10S')); // 168:00:10.000000
  print(parser.parse('PT5M')); // 0:05:00.000000
}
2
likes
150
points
17
downloads

Publisher

verified publisherinnim.ru

Weekly Downloads

Package to parse a duration from ISO 8601 string.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on duration_iso_parser