Validating a time between a couple of string based times

The following example uses the chronic_between gem to determine if the given time falls between the stated times.

require 'chronic_between'

Time.now #=> 2013-05-14 19:23:59 +0100
ChronicBetween.new('Mon-Fri 9:00-16:30').within? Time.now #=> false
ChronicBetween.new('Mon-Fri 9:00-19:30').within? Time.now #=> true

Tags:
Source:
2016hrs.txt
Published:
14-05-2013 20:16