Created
September 11, 2013 19:58
-
-
Save timrogers/6528957 to your computer and use it in GitHub Desktop.
in_business configuration
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
# Configure the gem with hours of your choice, on a day-by-day basis | |
InBusiness.hours = { | |
monday: "09:00".."18:00", | |
tuesday: "10:00".."19:00", | |
# ... | |
saturday: "09:00".."12:00" | |
} | |
InBusiness.open? # => true (if now is within the set hours) | |
InBusiness.open? DateTime.parse("9th September 2013 08:00") # => false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment