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

Only in your memory, I think.

> let span = 5.days().hours(8).minutes(1); # "original"

Actual ruby (with Rails extensions; stock ruby doesn't do this)

    irb(main):001> now = Time.now
    => 2024-07-23 08:31:53.656455305 -0400
    irb(main):002> now + 4.days + 8.minutes + 2.hours
    => 2024-07-27 10:39:53.656455305 -0400
So the version of his that you like for "consistency" is far more closely aligned to what ruby/rails _actually_ does.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: