Created
December 18, 2015 15:34
-
-
Save mspensieri/dcfe8740775b28406f73 to your computer and use it in GitHub Desktop.
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
var d = new Date(); | |
var utcTime = d.getUTCHours(); | |
var weekend = /^Sat|Sun/.test(d.toUTCString()); | |
var businessHours = utcTime > 13 && utcTime < 22; | |
if (!weekend && businessHours) { | |
SupportKit.init({appToken: '......'}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment