super_dates
1.0.0, released a year ago by idiomaticbytes.com
Type-safe Dart DateTime API extensions separating dates, local date-times, and UTC date-times.
What it does
SuperDates introduces three distinct temporal types (LocalDate, LocalDateTime, and UtcDateTime) to prevent time and timezone bugs at compile-time. It provides clear separation and easy conversion between pure dates, user-facing local timestamps, and server-side UTC timestamps.
AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to prevent timezone bugs by enforcing correct temporal types at compile time.
- Your application needs a strict separation between dates, local date-times, and UTC timestamps.
Skip it when
- You are using complex calendar or timezone database calculations not supported by the minimal API.
Strengths
- Compile-time safety preventing mixing of dates and date-times
- Clear distinction between local and UTC time
- Lightweight with minimal dependencies
Weaknesses
- Limited to basic temporal types and core DateTime integration
- Does not handle full timezone database conversions out of the box
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:super_dates/super_dates.dart';
final birthday = LocalDate(2025, 12, 25);
final appointment = LocalDateTime(2025, 12, 25, 10, 30);
final logEntry = UtcDateTime.now();Alternatives
Packages that do the same job and could replace super_dates.
- time
Type-safe DateTime and Duration calculations, powered by extensions.
70Compare - sugar
Standard library extension for date-times, timezones, collections, and monads.
68Compare - dart_date
Date manipulation library providing DateTime extensions and an Interval object.
63Compare - time_plus
Extensions for DateTime and Duration to easily add, convert, and work with time in Dart.
51Compare
Works with
Packages commonly used together with super_dates: ones it builds on, ones built on it, and its own family.