The 0.19 version of Elm introduced some important changes in the Time API which is now split into a separate package.
The DateTime package was inspired because date and time is a crucial part on our everyday lives and most of the products we are working on rely heavily on the correct interpretation of both. This means that whenever we need to handle date or time we need to be sure that it is a valid DateTime. In order to guarantee the validity of the DateTime but also create a solid package we had to compromise on using UTC time.
This basically means that all the results that come from the DateTime package are based on UTC and therefore the consumer should be the one that implements timezone specific solutions. That approach makes the DateTime package easier to use without having the overhead of timezones or daylight saving and it also gave us the opportunity to focus on implementing generic DateTime handling functionality instead of having to focus on timezone specific solutions.
The main goal of this package is to serve as an extension of elm/time and to provide isomorphism between Time.Posix and DateTime. This basically means that DateTime can be constructed by a Time.Posix type and it can be converted back to Time.Posix without losing any of it's integrity.
You can construct a DateTime in 2 different ways. Either by providing a Posix Time or by combining a Calendar.Date and a Clock.Time.

You can also attempt to construct a DateTime by providing its' constituent parts as raw data.

You can attempt to construct a Calendar.Date by providing its' constituent parts as raw data as shown in the diagram below.

There could be some cases where you don't really care about the time but you only need to store the Dates. Of course this will mean that if you try to convert a Calendar.Date to a Posix Time it will always default to midnight hours (00:00:00.000). You can always use this along with a Clock.Time to construct a DateTime in case you need to.
You can attempt to construct a Clock.Time by providing its' constituent parts as raw data as shown in the diagram below.

Building a timer app could be one of the cases where you don't really care about the Calendar.Date portion of DateTime. This would mean that you only need a Clock.Time in order to keep track of the time. Be very careful though if you want to get a valid Posix Time you would need to convert your Clock.Time to a DateTime by using a Calendar.Date as well.
npm install
npm run elm-make
npm test