3 ms·
Unfortunately it inherits JSON’s lack of support for dates.
by mickeypi 7y ago
Unfortunately it inherits JSON’s lack of support for dates.
- tlb 7y agoWhat’s the use case for dates in a config language? crontab is an example that comes to mind, but it uses its own system of date-time patterns. Javascript Date objects wouldnt be suitable.
- jsnell 7y agoDate arithmetic, parsing and formatting are very useful in config languages. Maybe your configs needs to express that when a program is run, the input should be read from a log file from two days ago named like /foo/bar/2019/07/02/access.log. That requires knowing what the current time is, computing what the time was two days ago, and formatting it in an arbitrary custom format (in this case YYYY/MM/DD). That doesn't necessarily mean that the language needs dates as a first class data type with a literal syntax etc.
- skybrian 7y agoCue hasn't reached 1.0 yet, so maybe it will be added? I don't see an issue for it, but you could ask.
- ithkuil 7y agoIt has a way to define types with regexps, so you can get a decent approximation of date support. I wish there was a way to implement more complex validation rules with custom code, although I'm not sure which language that would better be.