Hacker News new | ask | show | jobs
by gb 5508 days ago
I'm not disagreeing with your general point, but this does seem a little overkill when you could achieve a similar effect with a few constants:

  5 * MINUTE
  3.5 * HOUR
etc.
1 comments

Where are you getting these constants in JavaScript? You can't even trust the built-in "undefined" to actually contain "undefined".

(My point is: a library may be more appropriate in the JavaScript case, because of the lack of constants.)

is mytimelibrary.MINUTE what you're getting at?