Eve
Eve copied to clipboard
Need a set of time conversion functions
Eve needs functions to convert different time representations e.g. a timestamp into a [day month year ...], or into a string e.g. October 10th 2016.
Cool. Do you have a suggested API for this?
For example , something like this? (throwing ideas here - not sure what's the naming convention)
date = toDate[timestamp: 1479353359]
datestring = toDateString[date: [day: 16 month: 11: year: 2016]]
Well, we have plans for a general convert function. This could fit in there. For instance
converted-value = convert[value, from: "time-stamp", to: "time-string"]
Which could be used in other places as well:
converted-value = convert[value, from: "meters", to: "feet"]
I think the convert function is general is a good idea, but we need to think more about converting time formats, because it's apparently very hairy. The last thing we want to do is support our own time conversion library, so we'll need something already that conforms to time conversion standards.