Skip to content

Commit

Permalink
getX functions for Year, Month and Day
Browse files Browse the repository at this point in the history
  • Loading branch information
lukem512 committed Feb 12, 2016
1 parent 76e2767 commit eccca5a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions js/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,21 @@ if(!String.prototype.formatNum) {
}
return;
};

Calendar.prototype.getYear = function() {
var p = this.options.position.start;
return p.getFullYear();
};

Calendar.prototype.getMonth = function() {
var p = this.options.position.start;
return this.locale['m' + p.getMonth()];
};

Calendar.prototype.getDay = function() {
var p = this.options.position.start;
return this.locale['d' + p.getDay()];
};

Calendar.prototype.isToday = function() {
var now = new Date().getTime();
Expand Down

0 comments on commit eccca5a

Please sign in to comment.