4 ms·
Just a technical question, but is '90daysago' and 'yesterday' a common way of representing time in the node world, or are they just trying to show a generic cas
by diminoten 12y ago
Just a technical question, but is '90daysago' and 'yesterday' a common way of representing time in the node world, or are they just trying to show a generic case?
Also I know there's some turmoil in the Node.js/IO.js fork, what kind of practical implications does this have on projects like these?
- tobz 12y agoThere's at least one other language (PHP, [1]) that accepts these natural language versions of times. It's not quite the same syntax, but I don't think it's necessarily uncommon for some libraries to support these sorts of queries, for lack of a better word. On the flipside, there's definitely a lot of libraries that support displaying times in this way (like moment.js, [2]). [1] http://php.net/manual/en/function.strtotime.php http://php.net/manual/en/function.strtotime.php [2] http://momentjs.com/ http://momentjs.com/
- konklone 12y agoThat's actually the Google Analytics Reporting API's formal syntax: https://developers.google.com/analytics/devguides/reporting/core/v3/reference#q_summary https://developers.google.com/analytics/devguides/reporting/... It's pretty handy, since queries are so commonly exactly that: "the last 30 days" or whatever, and it saves the client from having to perform date calculation code to figure out just what that is.