You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just want to say that this is an excellent package working with date separately to time. I was looking to build my own wrapper package for the DateTime class to achieve something similar. Luckily I found your package.
The key feature that stood out to me is the ability to use a const constructor as a default value. DateTime used to have this, but no longer. This makes it hard to work with the freezed package when all you want is a default value instead of using a required field.
Some other features I'd like added:
The ability to show the difference in duration between 2 date values or 2 time values (currently can only be done with 1 date value and duration)
The ability to pass a format to Date, DateRange, and TimeRange classes (currently only time is formattable)
Introduce another class for DateAndTime to wrap DateTime so that it can be used as default values. This will just be a direct port from the DateTime class.
More comparison for date ranges, such as:
DateRange isWithin another dateRange
DateRange encapsulates another dateRange (this.start < other.start && this.end > than other.end)
DateRange is equal to, after, before, or overlap another date range
Convenient default values such as:
Date.startOfTime() - 0001-01-01
Date.epoch() - 1970-01-01
Date.endOfTime() - 9999-12-31
I'd be happy to contribute to this repos, if you'd let me.
Cheers!
The text was updated successfully, but these errors were encountered:
Hi @lhengl ,
glad to hear that someone else is using this package. Sure, feel free to contribute to this package and other mine packages. And please provide the desired implementation covered with tests. 🙌
Hi,
I just want to say that this is an excellent package working with date separately to time. I was looking to build my own wrapper package for the DateTime class to achieve something similar. Luckily I found your package.
The key feature that stood out to me is the ability to use a const constructor as a default value. DateTime used to have this, but no longer. This makes it hard to work with the freezed package when all you want is a default value instead of using a required field.
Some other features I'd like added:
I'd be happy to contribute to this repos, if you'd let me.
Cheers!
The text was updated successfully, but these errors were encountered: