Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?



There'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 [2] http://momentjs.com/


The GNU versions of find and date accept natural language for times. For find in the --newermt and similar predicates and for date in the the --date option.


Whattttttttt? This is amazing.


That's actually the Google Analytics Reporting API's formal syntax:

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.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: