easy_date_time 0.12.3 copy "easy_date_time: ^0.12.3" to clipboard
easy_date_time: ^0.12.3 copied to clipboard

An enhanced DateTime implementation with explicit IANA timezone support.

Changelog #

All notable changes to this project will be documented in this file.

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

0.12.3 - 2026-08-30 #

Changed #

  • Verified compatibility with Dart 3.13 while retaining Dart 3.10 as the minimum supported SDK.

0.12.2 - 2026-08-22 #

Fixed #

  • Corrected public EasyDateTime constructor examples to pass Location positionally.
  • Corrected isoStrict semantics and how fixed and region resolve numeric offsets.

Changed #

  • Clarified the configured local location used when no location is supplied, including implicit DST gap and overlap resolution.
  • Clarified that copyWith() called through a DateTime reference uses DateTime.copyWith().

0.12.1 - 2026-08-11 #

Fixed #

  • fromIso8601String() now accepts parse options, allowing fixed-offset ISO values to round-trip without region inference.
  • TimeZones.availableTimezones now throws TimeZoneNotInitializedException before timezone initialization.
  • UTC values now report UTC as their public location name even when the underlying timezone database uses Etc/UTC.

0.12.0 - 2026-05-03 #

Added #

  • Added EasyParseOptions, EasyParseMode, and OffsetResolution to select parsing and numeric-offset resolution policies.
  • Added ParseDiagnostics and ParseFailureStage to parsing failures.
  • Added [doc/migration/v0_12_migration_guide.md] (doc/migration/v0_12_migration_guide.md) for migration to the parsing policy model.

Changed #

  • parse() and tryParse() now accept options; calls without options retain the legacy parse path for migration compatibility.

Deprecated #

  • Deprecated the strict parameter in parse() and tryParse() in favor of EasyParseOptions.mode.

Fixed #

  • Fixed runtime-created EasyParseOptions to use the same policy as equivalent const options.
  • Fixed offset-resolution failures to retain policy-aware diagnostics.

0.11.1 - 2026-01-22 #

Changed #

  • Updated READMEs.
  • Modernized internal tokens and exception classes to use final class modifier.

0.11.0 - 2026-01-19 #

Added #

  • Added strict parameter to parse() and tryParse() for optional validation of calendar boundaries.

Changed #

  • Updated READMEs.

0.10.0 - 2026-01-18 #

Added #

  • Added meta dependency for internal API annotations.

Changed #

  • BREAKING: Upgraded minimum SDK constraint to 3.10.0.
  • BREAKING: Upgraded timezone dependency to >=0.11.0 <0.12.0.
  • Switched to package:timezone/data/latest_all.dart for comprehensive IANA support.
  • Optimized TimeZones class with static final fields for improved performance.

Removed #

  • BREAKING: Removed internalInitializeTimeZone and internalIsTimeZoneInitialized from public export.

0.9.1 - 2026-01-11 #

Changed #

  • Updated READMEs.

0.9.0 - 2026-01-10 #

Added #

  • isDst: Returns whether the datetime is in daylight saving time.
  • isPast: Returns whether the datetime is before the current time.
  • isFuture: Returns whether the datetime is after the current time.
  • isThisWeek: Returns whether the datetime falls within the current week.
  • isThisMonth: Returns whether the datetime falls within the current month.
  • isThisYear: Returns whether the datetime falls within the current year.

0.8.0 - 2026-01-04 #

Added #

  • daysInMonth: Returns the number of days in the current month.
  • isLeapYear: Returns whether the current year is a leap year.
  • isWeekend: Returns whether the date is Saturday or Sunday.
  • isWeekday: Returns whether the date is Monday through Friday.
  • quarter: Returns the quarter of the year (1-4).

0.7.0 - 2026-01-03 #

Added #

  • dayOfYear: Returns day of year (1-366).
  • weekOfYear: Returns ISO 8601 week number (1-53).

0.6.1 - 2025-12-30 #

Changed #

  • Updated READMEs.

0.6.0 - 2025-12-29 #

Added #

  • addCalendarDays(int days): Adds calendar days using local calendar semantics across DST transitions.
  • subtractCalendarDays(int days): Subtracts calendar days using local calendar semantics across DST transitions.

Changed #

  • tomorrow / yesterday: Now use calendar-day semantics instead of physical time across DST transitions.

0.5.2 - 2025-12-27 #

Fixed #

  • EasyDateTime.parse(): Correct DST offset resolution for gap/overlap times.

0.5.1 - 2025-12-25 #

Changed #

  • Updated READMEs.

0.5.0 - 2025-12-25 #

Added #

  • EasyDateTime.operator ==: Added support for equality comparison with DateTime.

Changed #

  • Updated operator == and hashCode documentation to clarify behavior and warn about mixed-type usage.

Thanks to @timmaffett (#19).

0.4.2 - 2025-12-22 #

Fixed #

  • Documentation: xxxxx token (timezone with colon) now documented in format() API.

0.4.1 - 2025-12-21 #

Added #

  • DateTimeUnit.week: ISO 8601 week boundary support for startOf() and endOf() (Monday = start, Sunday = end).

0.4.0 - 2025-12-20 #

Added #

  • EasyDateTime now implements DateTime, allowing it to be supplied to APIs that accept DateTime.
  • startOf(DateTimeUnit) / endOf(DateTimeUnit): Truncate to time unit boundaries.
  • DateTimeUnit enum: year, month, day, hour, minute, second.

Changed #

  • == operator now matches DateTime semantics (compares moment + isUtc).
  • Updated documentation with clearer equality comparison examples.
  • Added intl integration examples.

Removed #

  • BREAKING: Removed deprecated global functions (use static methods instead):
    • initializeTimeZone()EasyDateTime.initializeTimeZone()
    • setDefaultLocation()EasyDateTime.setDefaultLocation()
    • getDefaultLocation()EasyDateTime.getDefaultLocation()
    • clearDefaultLocation()EasyDateTime.clearDefaultLocation()
    • isTimeZoneInitializedEasyDateTime.isTimeZoneInitialized

Thanks to @timmaffett (#12).

0.3.8 - 2025-12-18 #

Added #

  • EasyDateTime.timestamp(): Returns current UTC time, equivalent to DateTime.timestamp().
  • fromSecondsSinceEpoch(): Added isUtc parameter for DateTime API compatibility.
  • fromMicrosecondsSinceEpoch(): Added isUtc parameter for DateTime API compatibility.

Thanks to @timmaffett (#16).

0.3.7 - 2025-12-16 #

Added #

  • EasyDateTimeFormatter: Named constructors (.isoDate(), .isoTime(), .isoDateTime(), .rfc2822(), .time12Hour(), .time24Hour()).
  • EasyDateTimeFormatter: Pattern caching for better performance.
  • EasyDateTimeFormatter.clearCache(): Clears cached formatters.

Thanks to @timmaffett (#13).

0.3.6 - 2025-12-14 #

Added #

  • fromMillisecondsSinceEpoch(): Added isUtc parameter for DateTime compatibility.

Thanks to @timmaffett (#11).

0.3.5 - 2025-12-13 #

Added #

  • Format tokens: EEE (weekday), MMM (month name), xxxxx/xxxx/xx/X (timezone offsets).

Changed #

  • DateTimeFormats.rfc2822 now outputs correct RFC 2822 format.

Removed #

  • BREAKING: Removed the following non-standard format constants:
    • DateTimeFormats.asianDate, usDate, euDate, fullDateTime, fullDateTime12Hour

    Migration: Use EasyDateTime.format() with custom patterns.

0.3.4 - 2025-12-12 #

Added #

  • EasyDateTimeFormatter: Pre-compiled date format patterns for better loop performance.
  • Caching for offset location lookups in parsing module.

0.3.3 - 2025-12-11 #

Added #

  • DateTime-aligned constants: monday-sunday, january-december, daysPerWeek, monthsPerYear.
  • Static methods: EasyDateTime.setDefaultLocation(), .getDefaultLocation(), .clearDefaultLocation(), .effectiveDefaultLocation, .initializeTimeZone(), .isTimeZoneInitialized.

Changed #

  • Fixed undefined isTimeZoneInitialized reference in parsing module.

Deprecated #

  • Global functions deprecated in favor of static methods (removal in v0.4.0):
    • initializeTimeZone()EasyDateTime.initializeTimeZone()
    • setDefaultLocation()EasyDateTime.setDefaultLocation()
    • getDefaultLocation()EasyDateTime.getDefaultLocation()
    • clearDefaultLocation()EasyDateTime.clearDefaultLocation()
    • isTimeZoneInitializedEasyDateTime.isTimeZoneInitialized

Thanks to @timmaffett (#7).

0.3.2 - 2025-12-11 #

Added #

  • DateTimeFormats.rfc2822 constant.
  • Optimized timezone offset lookup with cached common mappings.

Fixed #

  • Fixed quote handling in date formatting logic.
  • Verified pre-1970 date handling with boundary tests.

0.3.1 - 2025-12-11 #

Changed #

  • Updated package topics in pubspec.yaml.
  • Updated example documentation to use latest APIs.

0.3.0 - 2025-12-10 #

Added #

  • format(String pattern): Flexible date/time formatting with tokens (yyyy, MM, dd, HH, mm, ss, etc.).
  • DateTimeFormats: Predefined format constants (isoDate, isoTime, isoDateTime, time12Hour, time24Hour).

0.2.2 - 2025-12-09 #

Changed #

  • Updated documentation installation instructions.

Fixed #

  • Fixed formatting in CHANGELOG.md.

0.2.1 - 2025-12-09 #

Changed #

  • Standardized documentation tone across all languages.
  • Added CI validation for example code.
  • Updated example code to use fromIso8601String.

0.2.0 - 2025-12-08 #

Added #

  • fromSecondsSinceEpoch(int seconds, {Location? location}): Factory for Unix timestamps.
  • fromIso8601String(String dateTimeString): Explicit factory for ISO 8601 strings.

Changed #

  • BREAKING: Renamed inUtc()toUtc(), inLocalTime()toLocal(), isAtSameMoment()isAtSameMomentAs().
  • Modularized codebase into separate parsing and utilities files.

Removed #

  • BREAKING: Removed fromJson() and toJson() — Use fromIso8601String() and toIso8601String().

0.1.2 - 2025-12-07 #

Changed #

  • Updated READMEs.

0.1.1 - 2025-12-07 #

Added #

  • Initial release.
3
likes
160
points
420
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

An enhanced DateTime implementation with explicit IANA timezone support.

Repository (GitHub)
View/report issues
Contributing

Topics

#datetime #timezone #calendar #formatting #utils

License

BSD-2-Clause (license)

Dependencies

meta, timezone

More

Packages that depend on easy_date_time