calendar: Allow translators to change non-work days

https://bugzilla.gnome.org/show_bug.cgi?id=664645
This commit is contained in:
Lavi .A 2011-11-23 16:48:00 +00:00 committed by Bastien Nocera
parent 455595f2b2
commit 21d11b3638

View File

@ -34,12 +34,10 @@ function _sameDay(dateA, dateB) {
return _sameMonth(dateA, dateB) && (dateA.getDate() == dateB.getDate());
}
/* TODO: maybe needs config - right now we assume that Saturday and
* Sunday are non-work days (not true in e.g. Israel, it's Sunday and
* Monday there)
*/
function _isWorkDay(date) {
return date.getDay() != 0 && date.getDay() != 6;
/* Translators: Enter 0-6 (Sunday-Saturday) for non-work days. Examples: "0" (Sunday) "6" (Saturday) "06" (Sunday and Saturday). */
let days = C_('calendar-no-work', "06");
return days.indexOf(date.getDay().toString()) == -1;
}
function _getBeginningOfDay(date) {