Created
June 19, 2012 19:00
-
-
Save mkoby/2955899 to your computer and use it in GitHub Desktop.
Intro to Ruby - 16 - Gems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First you need to install the gem | |
# gem install chronic | |
# You should see it say "1 gem installed" when it's done | |
# | |
# Then open IRB | |
require 'chronic' | |
Chronic.parse(‘tomorrow’) # => tomorrow's date | |
Chronic.parse(‘2 weeks from next monday’) # => date that's 2 weeks from the next monday |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment