sync_datetime 0.2.2
sync_datetime: ^0.2.2 copied to clipboard
Dart & Flutter DateTime utilities for UTC timezone conversion, ISO 8601 parsing, client-server synchronization, REST API timestamps, date calculations, and calendar math.
0.2.2 #
- Update README.md version installation code snippet.
0.2.1 #
- Fix table of contents jump links on pub.dev by removing emojis from heading elements.
0.2.0 #
- Add Calendar Arithmetic & Boundaries (Tier 2):
- Added timezone-safe addition methods
addDays(),previousDay(),nextDay(),addMonths(),previousMonth(),nextMonth(),addYears(),previousYear(),nextYear(),addHours(), andaddMinutes(). - Added boundary limits
min(),max(), andclamp().
- Added timezone-safe addition methods
- Add Validation Helpers (Tier 3):
- Added relative checks
isToday(),isTomorrow(),isYesterday(),isPast(), andisFuture(). - Added range validation
isBetween()(supporting inclusive and exclusive checks). - Added precision checks
isSameHour(),isSameMinute(),isSameSecond(),isStartOfDay(), andisEndOfDay().
- Added relative checks
- Add Rounding APIs (Tier 4):
- Added timezone-preserving rounding methods
floorToMinute(),ceilToMinute(),roundToMinute(),floorToHour(),ceilToHour(),roundToHour(),floorToDay(),ceilToDay(), androundToDay().
- Added timezone-preserving rounding methods
- Refactored package internal architecture into distinct, clean private helper files.
- Expanded unit test coverage to 70 tests and updated the package example application.
0.1.6 #
- Improve
fromServerparser timezone handling logic by updating the timezone regex matching pattern. - Support all valid ISO 8601 offset strings including basic formats without colons (e.g.
+0000) and lowercase timezone indicators. - Expand test coverage validating various offset string patterns.
0.1.5 #
- Add Core Utilities:
today(),todayUtc(),nowUtc(),startOfDay(),endOfDay(),stripDate(),stripTime(), andcopyWith(). - Add Comparison Utilities:
isSameDay(),isSameMonth(),isSameYear(),daysBetween(), anddaysInMonth(),isLeapYear(). - Add Difference Helpers:
differenceInYears(),differenceInDays(),differenceInHours(),differenceInMinutes(),differenceInSeconds(), anddifferenceInMilliseconds(). - Add Server Synchronization Helper:
normalizeServerTimestamp(). - Enforce strict timezone matching across all comparison and difference APIs, throwing
ArgumentErroron mismatches. - Expand test coverage and update package examples.
0.1.4 #
- Add
toServerPartsstatic helper method to serialize aDateTimeinto aServerDateTimePartsobject (containing separate UTC date and time strings). - Export
ServerDateTimePartsfrom the main library entry point. - Update documentation and example script to showcase
toServerParts.
0.1.3 #
- Add
fromServerPartsstatic helper method to parse separate date and time strings. - Update documentation and example script to showcase
fromServerParts.
0.1.2 #
- Update README version references and documentation.
0.1.1 #
- Add repository metadata to
pubspec.yaml. - Fix potential 1-hour parsing offset bug under Daylight Saving Time (DST) transitions in
fromServer. - Improve parameter naming on
toUtcandtoServerfor clarity. - Implement detailed
ArgumentError.valuedebugging information. - Add additional test coverage for negative timezone offset parsing.
0.1.0 #
- Initial version.
- Implement reliable, predictable DateTime synchronization methods:
toUtc,fromUtc,toServer,fromServer, andcombine. - Enforce strict parameter validation and robust parsing of ISO 8601 strings (handling both explicit and implicit UTC formats).