-Copyright (c) 2013-2018 by the Babel Team, see AUTHORS for more information.
+Copyright (c) 2013-2019 by the Babel Team, see AUTHORS for more information.
All rights reserved.
access to various locale display names, localized number and date
formatting, etc.
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
Core locale representation and locale data access.
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
* ``LC_ALL``, and
* ``LANG``
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
if 7 - first_day >= self.locale.min_week_days:
week_number += 1
-
+
if self.locale.first_week_day == 0:
- # Correct the weeknumber in case of iso-calendar usage (first_week_day=0).
+ # Correct the weeknumber in case of iso-calendar usage (first_week_day=0).
# If the weeknumber exceeds the maximum number of weeks for the given year
- # we must count from zero.For example the above calculation gives week 53
- # for 2018-12-31. By iso-calender definition 2018 has a max of 52
+ # we must count from zero.For example the above calculation gives week 53
+ # for 2018-12-31. By iso-calender definition 2018 has a max of 52
# weeks, thus the weeknumber must be 53-52=1.
max_weeks = date(year=self.value.year, day=28, month=12).isocalendar()[1]
if week_number > max_weeks:
* ``LC_ALL``, and
* ``LANG``
- :copyright: (c) 2015, 2018 by the Babel Team.
+ :copyright: (c) 2015-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
:note: The `Locale` class, which uses this module under the hood, provides a
more convenient interface for accessing the locale data.
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
Babel specific fork of tzlocal to determine the local timezone
of the system.
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
Support for ``gettext`` message catalogs.
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
Data structures for message catalogs.
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
:since: version 0.9
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
The main entry points into the extraction functionality are the functions
`extract_from_dir` and `extract_from_file`.
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
Frontends for the message extraction functionality.
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from __future__ import print_function
A simple JavaScript 1.5 lexer which is used for the JavaScript
extractor.
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from collections import namedtuple
Writing of files in the ``gettext`` MO (machine object) format.
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
Plural form definitions.
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
Reading and writing of files in the ``gettext`` PO (portable object)
format.
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
* ``LC_ALL``, and
* ``LANG``
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
# TODO:
CLDR Plural support. See UTS #35.
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
import re
.. note: the code in this module is not used by Babel itself
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
Various utility classes and functions.
- :copyright: (c) 2013-2018 by the Babel Team.
+ :copyright: (c) 2013-2019 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
# General information about the project.
project = u'Babel'
-copyright = u'2018, The Babel Team'
+copyright = u'2019, The Babel Team'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
def test_en_gb_first_weekday():
assert Locale.parse('en').first_week_day == 0 # Monday in general
assert Locale.parse('en_US').first_week_day == 6 # Sunday in the US
- assert Locale.parse('en_GB').first_week_day == 0 # Monday in the UK
\ No newline at end of file
+ assert Locale.parse('en_GB').first_week_day == 0 # Monday in the UK
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2011 Edgewall Software, 2013-2018 the Babel team
+# Copyright (C) 2007-2011 Edgewall Software, 2013-2019 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which