Anonymous user
Days between dates: Difference between revisions
→{{header|Erlang}}: Did proper assignment with list comprehension :)
(Added Go) |
(→{{header|Erlang}}: Did proper assignment with list comprehension :)) |
||
Line 20:
between(DateOne,DateTwo) ->
[Y1,M1,D1] = [ daysbetween:dateToInts(DateOne
GregOne = calendar:date_to_gregorian_days(Y1,M1,D1),
GregTwo = calendar:date_to_gregorian_days(Y2,M2,D2),
GregTwo - GregOne.
</lang>
|