Created
March 9, 2016 16:23
-
-
Save sergions80/90c0e177ebd0dd1ab677 to your computer and use it in GitHub Desktop.
Complete Example Module Template
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
/** Utility methods for handling dates | |
@class Dates | |
@static | |
*/ | |
var Dates = (function($) { | |
"use strict"; | |
/** Lets you know if a supplied date is a Monday | |
@method isMonday | |
@param {Date} dateObj date to test | |
@return {Boolean} true if supplied date is a Monday | |
*/ | |
function isMonday(dateObj) { | |
var inputDayOfTheWeek = dateObj.getDay(), | |
mondayDayOfTheWeek = 1; | |
return (inputDayOfTheWeek === mondayDayOfTheWeek); | |
} | |
return { | |
isMonday: isMonday | |
}; | |
}(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment