I'm working on a Golang example that requires some date calculations. I was rather hoping that Go would provide some nice date libraries similar to the excellent Python datetime
module, but that doesn't appear to be the case.
How can I represent this python example in Go ?
from datetime import date
d0 = date(2013, 8, 18)
d1 = date(2018, 9, 26)
delta = d0 - d1
print delta.days
>>-1865
I've spent a fair bit of time looking around on how to do this I can't seem to find a definitive answer that is clear and concise and without caveats such as not properly calculating leap years etc.
This seems to be a fairly big limitation to what is becoming an excellent little language for building cross platform prototypes and eventually production applications.