Jun Omae avatar Jun Omae committed 49bf576

Fixed first day in the week without territory of the locale.

Comments (0)

Files changed (2)

trac/util/datefmt.py

     if ampm:
         tmpl = tmpl.replace(ampm, 'TT', 1)
     return tmpl.replace('23', 'hh', 1).replace('11', 'hh', 1) \
-               .replace('59', 'mm', 1).replace('58', 'ss', 1) \
-               
+               .replace('59', 'mm', 1).replace('58', 'ss', 1)
 
 def is_24_hours(locale):
     """Returns `True` for 24 hour time formats."""

trac/web/chrome.py

                             or 'common/css/jquery-ui/jquery-ui.css')
         add_script(req, 'common/js/jquery-ui-addons.js')
         add_stylesheet(req, 'common/css/jquery-ui-addons.css')
-        first_day = (req.locale.first_week_day + 1) % 7 if req.locale else 1
+        first_day = (req.locale.first_week_day + 1) % 7 \
+                    if req.locale and req.locale.territory else 0
         add_script_data(req, jquery_ui={
             'month_names': get_month_names_jquery_ui(req),
             'day_names': get_day_names_jquery_ui(req),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.