Rusty Shackleford wrote:Time.now will give you the current time and date.
If you use the activesupport gem you can do awesome stuff like this in ruby: 10.days.ago or 5.minutes.from_now or 22.weeks.from_now these are all methods, in ruby the () is usually optional
=> Tue Jul 08 01:06:00 -0700 2008
=> Sat Jun 28 01:06:04 -0700 2008
=> Tue Jul 08 01:11:09 -0700 2008
=> Tue Dec 09 01:06:11 -0800 2008
Ruby is an elegant language.
How do you get the active support gem . By the way a gem is a package right? so how can i find such packages or have a look at a list of packages ???
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton