sync_datetime 0.1.6
sync_datetime: ^0.1.6 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.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).