tempo 0.7.1 copy "tempo: ^0.7.1" to clipboard
tempo: ^0.7.1 copied to clipboard

A complete time and date solution that replaces Dart's core DateTime with a rich set of date and time classes, advanced arithmetic features and full time zone support.

Changelog #

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.7.1 - 2025-12-10 #

Changed #

  • Updated to timezone database version 2025c

0.7.0 - 2025-08-02 #

Added #

  • Missing conversion methods, and standardized the existing ones (see the library docs for a list of conversion method names)
  • New ISO 8601 parse() constructors for Instant and ZonedDateTime
  • Parses ISO date times with either a space or no separator instead of a 'T'

Changed #

  • Breaking: ZonedDateTime.defaultZoneId moved to a top-level getter/setter pair
  • Setting defaultZoneId to an invalid value now throws an exception
  • Breaking: ZonedDateTime.toOffset() changed to a getter, asOffsetDateTime
  • Breaking: toDateTime() no longer a part of the HasDate interface
  • Breaking: HasInstant now uses toInstant() method instead of asInstant getter
  • Breaking: OffsetDateTime now defaults to defaultZoneId instead of UTC:
    • Removed offset arg from the unnamed constructor. Use withOffset constructor instead
    • All other offset constructor and conversion method args are now optional and default to the time zone in defaultZoneId
    • One exception: the fromDateTime constructor continues to use the offset from the DateTime it's given

Removed #

  • Breaking: All asInstant getters removed. Use toInstant() instead.

Fixed #

  • Breaking: DateTime extension method toLocal() renamed to toLocalDateTime() so it doesn't shadow an existing method
  • Test matchers hasDate and hasTime no longer ignore unspecified fields, and instead check for expected defaults. For example, expect(LocalTime(4, 30), hasTime(4)) used to pass. Now it fails, since the unspecified minute matcher defaults to 0.

0.6.0 - 2025-06-11 #

Added #

  • Added us and iso getters to Weekday for weekday numbers
  • Added extension methods on DateTime and Duration to convert to Tempo objects

Changed #

  • Minimum Dart SDK is now 3.0.0
  • Made zoneId optional for ZonedDateTime creation. This is seamless with one exception (see below)
  • Breaking: Removed zoneId arg from ZonedDateTime(). Use ZonedDateTime.withZoneId() if you want to specify a time zone.
  • ZonedDateTime now has a settable defaultZoneId field that will be used if none is provided.
  • Improved documentation; assigned objects to categories and created category documentation pages.

0.5.4 - 2025-05-22 #

Changed #

  • Updated to tzdb-2025b
  • Minimum Dart SDK is now 2.19.0

0.5.3 - 2024-08-03 #

Changed #

  • Updated to tzdb-2024a.

0.5.2 - 2023-05-26 #

Added #

  • Added unixTimestamp and inTimezone() to HasInstant interface.

0.5.1 - 2023-05-21 #

Changed #

  • Fixed broken links in README.md

0.5.0 - 2023-05-21 #

Added #

  • Initial version.
6
likes
160
points
355
downloads

Publisher

verified publisherniladic.org

Weekly Downloads

A complete time and date solution that replaces Dart's core DateTime with a rich set of date and time classes, advanced arithmetic features and full time zone support.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

built_collection, built_value, collection, meta, string_scanner, test

More

Packages that depend on tempo