From 21d11b3638572fa3db7dbc57d64670e6f2971c15 Mon Sep 17 00:00:00 2001 From: "Lavi .A" Date: Wed, 23 Nov 2011 16:48:00 +0000 Subject: [PATCH] calendar: Allow translators to change non-work days https://bugzilla.gnome.org/show_bug.cgi?id=664645 --- js/ui/calendar.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/js/ui/calendar.js b/js/ui/calendar.js index e639ef739..127eb2d2d 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -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) {