Skip to content

Instantly share code, notes, and snippets.

@SimplGy
Created March 7, 2013 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SimplGy/5109152 to your computer and use it in GitHub Desktop.
Save SimplGy/5109152 to your computer and use it in GitHub Desktop.
Date.prototype.addHours = (h) ->
date = new Date @
date.setHours @getHours() + h
date
Date.prototype.isWeekday= ->
weekdays = [1..5] # Javascript days are integers from 0-6 starting at Sunday
debugger
_.contains weekdays, @.getDay()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment