super_dates library
SuperDates is a minimal typesafe DateTime API extension for Dart.
Dart's DateTime is a one-stop-shop for dates and date-times (local and utc-based).
This project provides a minimal extension to that API, by defining three primatives to split the concerns of dates and date-times (local and utc-based):
- LocalDate - a date with no time or zone
- LocalDateTime - a date-time with an implicit timezone (from the system)
- UtcDateTime - a date-time with an explicit timezone (UTC)
The primitives can be created directly from, and conveted back to, core DateTimes.
Classes
- LocalDate
- A simple date object with no time or timezone to be used in place of Dart's DateTime when you only need to represent a date.
- LocalDateTime
- A date with a time and timezone component, where the timezone is equal to that of the host system.
- UtcDateTime
- A date with a time and timezone component, where the timezone is equal to UTC.