iso8601_offset 1.0.1 copy "iso8601_offset: ^1.0.1" to clipboard
iso8601_offset: ^1.0.1 copied to clipboard

Provide a string containing offset information that is not processed by `DateTime.toIso8601String()`.

iso8601_offset #

Features #

Provide a string containing offset information that is not processed by DateTime.toIso8601String().

Usage #

import 'package:iso8601_offset/iso8601_offset.dart';

// When running on a terminal at JST(+09:00).
// 2021-11-25 03:00:00 UTC time, 2021-11-25 12:00:00 terminal time
final now = DateTime.now();

final defaultIsoString = dateTime.toIso8601String();
print(defaultIsoString); // 2021-11-25T12:00:00.0000

final utcIso8601String = dateTime.toIso8601UtcString();
print(defaultIsoString); // 2021-11-25T03:00:00.0000Z

final offsetIso8601String = dateTime.toIso8601OffsetString();
print(defaultIsoString); // 2021-11-25T12:00:00.0000+09:00
0
likes
150
points
304
downloads

Publisher

unverified uploader

Weekly Downloads

Provide a string containing offset information that is not processed by `DateTime.toIso8601String()`.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on iso8601_offset