Time Arithmetic
September 15, 2015
The Standard Prelude provides functions julian
and gregorian
for performing date arithmetic. In today’s exercise we will extend those functions to provide arithmetic on times as well. The parameters provided to julian
will be year, month, day, hour, minute, and second, and the same parameters will be returned by gregorian
.
Your task is to write the new julian
and gregorian
functions. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.