Sometimes an API returns a List of Int's and you have to deal with it. This package helps with the conversion from and to.
Converts a List of Int's to a Maybe Date. It expects a total of 7 integers representing year till milisceonds. If this is not the case it will fill in the rest with zero's.
listToDate [] -- Nothing
listToDate [ 2018, 5, 31 ] -- Just <Thu May 31 00:00:00 GMT+0000>
listToDate [ 2018, 5, 31, 15, 16 ] -- Just <Thu May 31 15:16:00 CMT+0000>
listToDate [ 2018, 5, 31, 15, 16, 20, 1000 ] -- Just <Thu May 31 15:16:20 CMT+0000>Provides a decoder that will convert a List of Int to a Date.
Provides an encoder that will convert a Date to a List of Int's.
Converts a date to a List of Int's. With the head being the year and the last the milliseconds.