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

retracted

Timezone-aware DateTime for Dart. Supports local time by default, optional IANA timezones, intuitive operators, and standard JSON serialization. Perfect for Flutter and server-side applications.

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.1.0 - 2025-12-06 #

Initial release of easy_date_time package.

Core Features #

  • EasyDateTime class - Timezone-aware DateTime implementation
  • Local timezone as default - Works immediately without configuration
  • TimeZones convenience API - 30+ common timezones with easy accessors

Constructors #

  • EasyDateTime() - From date/time components
  • EasyDateTime.now() - Current time
  • EasyDateTime.utc() - UTC time
  • EasyDateTime.fromDateTime() - From standard DateTime
  • EasyDateTime.fromMillisecondsSinceEpoch() / fromMicrosecondsSinceEpoch()
  • EasyDateTime.parse() / tryParse() - Parse ISO 8601 strings

Date Utilities #

  • dateOnly / startOfDay - Get date without time (00:00:00)
  • endOfDay - Last moment of the day (23:59:59.999999)
  • startOfMonth / endOfMonth - First/last moment of month
  • tomorrow / yesterday - Next/previous day
  • isToday / isTomorrow / isYesterday - Date checking
  • toDateString() / toTimeString() - Formatted output

Timezone Operations #

  • inLocation() - Convert to specific timezone
  • inUtc() - Convert to UTC
  • inLocalTime() - Convert to local time
  • setDefaultLocation() / clearDefaultLocation() - Global timezone config

Operators & Comparison #

  • Arithmetic: +, - with Duration
  • Comparison: <, >, <=, >=, ==
  • Methods: isBefore(), isAfter(), isAtSameMoment()

Extensions #

  • Duration: 1.days, 2.hours, 30.minutes, etc.
  • DateTime: toEasyDateTime() for easy conversion

Serialization #

  • toJson() / fromJson() - ISO 8601 format
  • Compatible with json_serializable, freezed
3
likes
0
points
1.14k
downloads

Publisher

unverified uploader

Weekly Downloads

Timezone-aware DateTime for Dart. Supports local time by default, optional IANA timezones, intuitive operators, and standard JSON serialization. Perfect for Flutter and server-side applications.

Repository (GitHub)
View/report issues

Topics

#datetime #timezone #time #date #json

License

unknown (license)

Dependencies

timezone

More

Packages that depend on easy_date_time