16 Apr '12, 10pm

Time.now is on my side

April 16, 2012 Tagged: ruby time Comments (View) Time.now is on my side I needed an open? method. First try: def open? opens_at <= Time.now < closes_at end However, Ruby doesn’t support that kind of expression. Second try: def open? (opens_at <= Time.now) && (Time.now < closes_at) end It’s noisy and lacks expression. Third time’s a charm: def open? Time.now.between? opens_at, closes_at end Thanks, ActiveSupport::TimeWithZone !

Full article: http://robots.thoughtbot.com/post/21232135595/time-now-is...

Tweets

Smaller gator fleet has side effects for Corps - Marine Corps Times

Smaller gator fleet has side effects for Corps ...

marinecorpstimes.com 15 Apr '12, 4pm

http://www.marinecorpstimes.com/news/2012/04/marine-smaller-gator-fleet-side-effects-for-corps-041512/ Smaller gator fleet...

Cool product! > @SCHOTT_ROBAX: Happy to be w/ @...

greenbuildermag.com 17 Apr '12, 5pm

SCHOTT is an international technology group with more than 125 years of experience. We rank as number one in the world wit...

22:55: ENDED: R12 and 33 Eastbound William clos...

winnipegtransit.com 17 Apr '12, 12am

Service Advisory R12 and 33 Eastbound William closed near side Sherbrook As of 19:00, routes 12, 33, 35 are under the effe...

The Concorde Hotel: 39% off Hola! Amigo's Tenderloin Steak + 1 Side Dish + 1 Basket of Salsa and Chips

The Concorde Hotel: 39% off Hola! Amigo's Tende...

deal.com.sg 16 Apr '12, 4am

39% off Hola! Amigo’s Tenderloin Steak + 1 Side Dish + 1 Basket of Salsa and Chips Only $16.90 per pax instead of $27.90 G...