Testing with Joda DateTime in irb

157 views Asked by At

Could some guide me on how I can run and test Joda Time Functions in irb

$ irb
irb(main):001:0> org.joda.time.DateTime.new(2017,1,1,0,0,0).toString("YYYY ww")

NameError: undefined local variable or method `org' for main:Object
    from (irb):1
    from /usr/bin/irb:12:in `<main>'
irb(main):002:0>
1

There are 1 answers

0
Sandeep Kanabar On

Figured out the answer. The trick is to install JRuby and then use jirb instead of irb.