Translate times between each other easier for cleaner code. I.e. Duration.fromMinutes(27).toSeconds();
!(DANGER) This should not be used with real Dates. In the real world, not every day has 24 hours, and time is weird. This is just a simple abstraction.
If you want real time adding on Dates, use Moment or similar library.
Can be used for simple conversions, I recommend going from bigger to smaller because of floating point errors though i.e. Duration.fromDays().toSeconds();
I also recommend checking isForever for unique cases.
Translate times between each other easier for cleaner code. I.e.
Duration.fromMinutes(27).toSeconds();
!(DANGER) This should not be used with real Dates. In the real world, not every day has 24 hours, and time is weird. This is just a simple abstraction. If you want real time adding on Dates, use Moment or similar library.Can be used for simple conversions, I recommend going from bigger to smaller because of floating point errors though i.e.
Duration.fromDays().toSeconds();
I also recommend checking isForever for unique cases.