Created
October 4, 2013 23:39
-
-
Save rohozhnikoff/6834578 to your computer and use it in GitHub Desktop.
Начинаем день недели с понедельника
This file contains hidden or 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
Date.prototype.getWeekday = function(){ | |
var weekday = this.getDay() - 1; | |
if(weekday === -1) weekday = 6; | |
return weekday; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment