These are chat archives for opal/opal
Date.new + 1but getting
lhs.$+ is not a functionin 0.9.0-dev. I've seen a lot of changes going on in 0.9.0-dev for dates and time so should was wondering if that's something that is coming?
@djboardman hmm, it looks like calling
Date.new without arguments is broken (it does not default to today as Ruby does). Here's what I'm getting:
$ bundle exec opal -ve "require 'date'; p Date.new" Opal v0.9.0.dev NaN-NaN-NaN
$ bundle exec opal -ve "require 'date'; d = Date.new(2015, 1, 1); p d; p d + 1" Opal v0.9.0.dev 2015-01-01 2015-01-02
So, call it with args or use
$ bundle exec opal -ve "require 'date'; d = Date.today; p d; p d + 1" Opal v0.9.0.dev 2015-08-08 2015-08-09
I'll see if I can fix this today though, thanks for bringing it up!
Date.newis supposed to default to