Skip to content

Instantly share code, notes, and snippets.

@sergions80
Created March 9, 2016 16:23
Show Gist options
  • Save sergions80/90c0e177ebd0dd1ab677 to your computer and use it in GitHub Desktop.
Save sergions80/90c0e177ebd0dd1ab677 to your computer and use it in GitHub Desktop.
Complete Example Module Template
/** 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