403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/babel/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/babel/__pycache__/dates.cpython-314.pyc
+
�90il*��a�0t$Rt^RIHt^RIt^RIt^RIt^RIHt^RI	H
t
HtHt^RI
t
^RIt^RIHt^RIHt^RIHtHtHt^RIHt]
'd�^R	IHt]P:]P<,],R,t R
]!R&]R�,t"R
]!R&]R�,t#R
]!R
&]P ]PH,]%,]&,]P<,R,t'R
]!R&Rt(]PRPTt+]PXt,]!R4t-RRlt.RRlt/RRlt0RRlt1R�RRllt2R�RRllt3R�RRllt4R�RR llt5R�R!R"llt6R�R#R$llt7R�R%R&llt8R�R'R(llt9R�R)R*llt:R�R+R,llt;R�R-R.llt<R�R/R0llt=R�R1R2llt>R�R3R4llt?R�R5R6llt@R�R7R8lltAR�R9R:lltBR�R;R<lltCR�tDR=]!R>&R�R?R@lltERARBltFR�RCRDlltGR�RERFlltH!RGRH]I4tJR�RIRJlltKR�RKRLlltL!RMRN4tM!RORP4tN/RQ.R�ObRRRbRSRbRTRbRU.R�ObRV.R�ObRW.R�ObRX.R�ObRY^^.bRZ^.bR[^^.bR\.R�ObR]^.bR^RbR_.R�ObR`.R�ObRa.R�Ob/Rb.R�ObRc.R�ObRd.R�ObRe^^.bRf^^.bRg^^.bRh^^.bRi^^.bRj^^.bRkRbRlRbRm.R�ObRn.R�ObRo^^.bRp^^.bRq.R�ObRr.R�ObCRs.R�O/CtORt]!Ru&RvtPRwRxltQ]!RyRz7R{R|l4tRR}R~ltSRR�ltTR�R�ltUR�R�R�lltVR# ]dRt
^RItEL�i;i)�a[
babel.dates
~~~~~~~~~~~

Locale dependent formatting and parsing of dates and times.

The default locale for the functions in this module is determined by the
following environment variables, in that order:

 * ``LC_TIME``,
 * ``LC_ALL``, and
 * ``LANG``

:copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
)�annotationsN)�	lru_cache)�
TYPE_CHECKING�Literal�SupportsInt)�Iterable)�	localtime)�Locale�default_locale�
get_global)�LocaleDataDict)�	TypeAliasr
�_Instant�_PredefinedTimeFormat�_Context�_DtOrTzinfou	∅∅∅�LC_TIMEc�$�V^8�dQhRRRRRR/#)��tz�datetime.tzinfo�dt�datetime.datetime�return�)�formats"�-/usr/lib/python3/dist-packages/babel/dates.py�__annotate__r=s#����/��'8��=N��c���VPVJdV#\VR4'dVPV4#VPfVPVR7#VP	V4#)�localize��tzinfo)r"�hasattrr �replace�
astimezone)rrs&&r�	_localizer&=s[��
�y�y�B���	��r�:����{�{�2���	�y�y���z�z��z�$�$��=�=���rc� �V^8�dQhRRRR/#)r�dt_or_tzinforrz0tuple[datetime.datetime | None, datetime.tzinfo]r)rs"rrrNs����[��5e�rc��Vf(\PP4p\pW3#\V\4'dRp\V4pW3#\V\4'dRp\pW3#\V\P\P34'd/\V4pVPe
VPM\pW3#RpTpW3#)z�
Parse a `dt_or_tzinfo` value into a datetime and a tzinfo.

See the docs for this function's callers for semantics.

:rtype: tuple[datetime, tzinfo]
N)�datetime�now�LOCALTZ�
isinstance�str�get_timezone�int�UTC�time�
_get_datetimer"�r(rr"s&  r�_get_dt_and_tzinfor5Ns�����
�
�
�
"�
"�
$�����:��
�L�#�	&�	&�
���l�+���:��
�L�#�	&�	&�
�����:��

�L�8�#4�#4�h�m�m�"D�	E�	E�
�<�
(�� �i�i�3�������:������
�:�rc� �V^8�dQhRRRR/#)rr(rrr.r)rs"rrrhs��?�?�{�?�s�?rc�(�\V4wr\VR4'd
VP#\VR4'dVPe
VP#TP	T;'g$\
P
P
\44#)zO
Get the timezone name out of a time, datetime, or tzinfo object.

:rtype: str
�zone�key)r5r#r8r9�tznamer*r+r1r4s&  r�_get_tz_namer;hso��$�L�1�J�B��v�v����{�{��	���	�	�F�J�J�$:��z�z���}�}�R�=�=�8�#4�#4�#8�#8��#=�>�>rc� �V^8�dQhRRRR/#)r�instantrrrr)rs"rrrws��(�(�8�(�(9�(rc��Vf4\PP\4PRR7#\	V\
\34'd5\PPV\4PRR7#\	V\P4'd=\PP\PP4V4#\	V\P4'dT\	V\P4'g4\PPV\P!44#V#)a4
Get a datetime out of an "instant" (date, time, datetime, number).

.. warning:: The return values of this function may depend on the system clock.

If the instant is None, the current moment is used.
If the instant is a time, it's augmented with today's date.

Dates are converted to naive datetimes with midnight as the time component.

>>> from datetime import date, datetime
>>> _get_datetime(date(2015, 1, 1))
datetime.datetime(2015, 1, 1, 0, 0)

UNIX timestamps are converted to datetimes.

>>> _get_datetime(1400000000)
datetime.datetime(2014, 5, 13, 16, 53, 20)

Other values are passed through as-is.

>>> x = datetime(2015, 1, 1)
>>> _get_datetime(x) is x
True

:param instant: date, time, datetime, integer, float or None
:type instant: date|time|datetime|int|float|None
:return: a datetime
:rtype: datetime
Nr!)r*r+r1r$r-r0�float�
fromtimestampr2�combine�date�today)r=s&rr3r3ws���>��� � �$�$�S�)�1�1��1�>�>�	�G�c�5�\�	*�	*�� � �.�.�w��<�D�D�D�D�Q�Q�	�G�X�]�]�	+�	+�� � �(�(����)<�)<�)>��H�H�	�G�X�]�]�	+�	+�J�w��HY�HY�4Z�4Z�� � �(�(��(�-�-�/�B�B��Nrc�$�V^8�dQhRRRRRR/#)rrrr"�datetime.tzinfo | Nonerr)rs"rrr�s$���� 1��;Q��]n�rc���VPfVP\R7pVe>VP\	V44p\VR4'dVP
V4pV#)a
Ensure the datetime passed has an attached tzinfo.

If the datetime is tz-naive to begin with, UTC is attached.

If a tzinfo is passed in, the datetime is normalized to that timezone.

>>> from datetime import datetime
>>> _get_tz_name(_ensure_datetime_tzinfo(datetime(2015, 1, 1)))
'UTC'

>>> tz = get_timezone("Europe/Stockholm")
>>> _ensure_datetime_tzinfo(datetime(2015, 1, 1, 13, 15, tzinfo=UTC), tzinfo=tz).hour
14

:param datetime: Datetime to augment.
:param tzinfo: optional tzinfo
:return: datetime with tzinfo
:rtype: datetime
r!�	normalize)r"r$r1r%r/r#rG)rr"s&&r�_ensure_datetime_tzinforH�sY��*
�y�y��
�Z�Z�s�Z�
#��
��
�]�]�<��/�
0���6�;�'�'��!�!�"�%�B�
�Irc�$�V^8�dQhRRRRRR/#)rr2z(datetime.time | datetime.datetime | Noner"rEr�
datetime.timer)rs"rrr�s&����
2��"���rc��Vf%\PP\4pM@\V\\
34'd%\PP
V\4pVPfVP\R7p\V\P4'dKVe5VPV4p\VR4'dVPV4pVP4pV#VeVPVR7pV#)z�
Get a timezoned time from a given instant.

.. warning:: The return values of this function may depend on the system clock.

:param time: time, datetime or None
:rtype: time
r!rG)
r*r+r1r-r0r?r@r"r$r%r#rG�timetz)r2r"s&&r�	_get_timerM�s����|�� � �$�$�S�)��	�D�3��,�	'�	'�� � �.�.�t�S�9���{�{���|�|�3�|�'���$��)�)�*�*����?�?�6�*�D��v�{�+�+��'�'��-���{�{�}���K�
�	��|�|�6�|�*���Krc� �V^8�dQhRRRR/#)rr8zstr | datetime.tzinfo | Nonerrr)rs"rrr�s��;�;�3�;��;rc��Vf\#\V\4'gV#\'d\P!V4#\'gQh\P!V4# \P
d
pTpRp?M,Rp?ii;i \Pd
pTpRp?MRp?ii;i\RT24Th)a�Looks up a timezone by name and returns it.  The timezone object
returned comes from ``pytz`` or ``zoneinfo``, whichever is available.
It corresponds to the `tzinfo` interface and can be used with all of
the functions of Babel that operate with dates.

If a timezone is not known a :exc:`LookupError` is raised.  If `zone`
is ``None`` a local zone object is returned.

:param zone: the name of the timezone to look up.  If a timezone object
             itself is passed in, it's returned unchanged.
NzUnknown timezone )
r,r-r.�pytz�timezone�UnknownTimeZoneError�zoneinfo�ZoneInfo�ZoneInfoNotFoundError�LookupError)r8�e�excs&  rr/r/�s����|����d�C� � ����t�	��=�=��&�&��x��x�	��$�$�T�*�*���(�(�	��C��	���-�-�	��C��	���)�$��0�
1�s�:s/�A+�B�+B�B�B�B0�$B+�+B0c�(�V^8�dQhRRRRRRRR/#�	r�width�(Literal['abbreviated', 'narrow', 'wide']�contextr�locale�Locale | str | Nonerrr)rs"rrr�s6��G�G�3�G�
�G�
 �G��	Grc�z�\P!T;'g\4PV,V,#)aTReturn the names for day periods (AM/PM) used by the locale.

>>> get_period_names(locale='en_US')['am']
u'AM'

:param width: the width to use, one of "abbreviated", "narrow", or "wide"
:param context: the context, either "format" or "stand-alone"
:param locale: the `Locale` object, or a locale string. Defaults to the system time locale.
)r	�parser�day_periods�r[r]r^s&&&r�get_period_namesrd�s+���<�<��)�)�'�*�6�6�w�?��F�Frc�(�V^8�dQhRRRRRRRR/#)	rr[z1Literal['abbreviated', 'narrow', 'short', 'wide']r]rr^r_rrr)rs"rrrs6��@�@�<�@�
�@�
 �@��	@rc�z�\P!T;'g\4PV,V,#)aReturn the day names used by the locale for the specified format.

>>> get_day_names('wide', locale='en_US')[1]
u'Tuesday'
>>> get_day_names('short', locale='en_US')[1]
u'Tu'
>>> get_day_names('abbreviated', locale='es')[1]
u'mar'
>>> get_day_names('narrow', context='stand-alone', locale='de_DE')[1]
u'D'

:param width: the width to use, one of "wide", "abbreviated", "short" or "narrow"
:param context: the context, either "format" or "stand-alone"
:param locale: the `Locale` object, or a locale string. Defaults to the system time locale.
)r	rar�daysrcs&&&r�
get_day_namesrhs+��(�<�<��)�)�'�*�/�/��8��?�?rc�(�V^8�dQhRRRRRRRR/#rZr)rs"rrr's6��B�B�3�B�
�B�
 �B��	Brc�z�\P!T;'g\4PV,V,#)a�Return the month names used by the locale for the specified format.

>>> get_month_names('wide', locale='en_US')[1]
u'January'
>>> get_month_names('abbreviated', locale='es')[1]
u'ene'
>>> get_month_names('narrow', context='stand-alone', locale='de_DE')[1]
u'J'

:param width: the width to use, one of "wide", "abbreviated", or "narrow"
:param context: the context, either "format" or "stand-alone"
:param locale: the `Locale` object, or a locale string. Defaults to the system time locale.
)r	rar�monthsrcs&&&r�get_month_namesrl's+��$�<�<��)�)�'�*�1�1�'�:�5�A�Arc�(�V^8�dQhRRRRRRRR/#rZr)rs"rrr<s6��D�D�3�D�
�D�
 �D��	Drc�z�\P!T;'g\4PV,V,#)a�Return the quarter names used by the locale for the specified format.

>>> get_quarter_names('wide', locale='en_US')[1]
u'1st quarter'
>>> get_quarter_names('abbreviated', locale='de_DE')[1]
u'Q1'
>>> get_quarter_names('narrow', locale='de_DE')[1]
u'1'

:param width: the width to use, one of "wide", "abbreviated", or "narrow"
:param context: the context, either "format" or "stand-alone"
:param locale: the `Locale` object, or a locale string. Defaults to the system time locale.
)r	rar�quartersrcs&&&r�get_quarter_namesrp<s+��$�<�<��)�)�'�*�3�3�G�<�U�C�Crc�$�V^8�dQhRRRRRR/#)rr[r\r^r_rrr)rs"rrrQs&��7�7�3�7��7��7rc�l�\P!T;'g\4PV,#)aeReturn the era names used by the locale for the specified format.

>>> get_era_names('wide', locale='en_US')[1]
u'Anno Domini'
>>> get_era_names('abbreviated', locale='de_DE')[1]
u'n. Chr.'

:param width: the width to use, either "wide", "abbreviated", or "narrow"
:param locale: the `Locale` object, or a locale string. Defaults to the system time locale.
)r	rar�eras�r[r^s&&r�
get_era_namesruQs&���<�<��)�)�'�*�/�/��6�6rc�$�V^8�dQhRRRRRR/#�rrrr^r_r�DateTimePatternr)rs"rrrb�+��@�@�!�@��@��@rc�l�\P!T;'g\4PV,#)a�Return the date formatting patterns used by the locale for the specified
format.

>>> get_date_format(locale='en_US')
<DateTimePattern u'MMM d, y'>
>>> get_date_format('full', locale='de_DE')
<DateTimePattern u'EEEE, d. MMMM y'>

:param format: the format to use, one of "full", "long", "medium", or
               "short"
:param locale: the `Locale` object, or a locale string. Defaults to the system time locale.
)r	rar�date_formats�rr^s&&r�get_date_formatr}b�&�� �<�<��)�)�'�*�7�7��?�?rc�$�V^8�dQhRRRRRR/#rwr)rs"rrrus&����!�����rc�~�\P!T;'g\4PpW9dRpW ,#)aDReturn the datetime formatting patterns used by the locale for the
specified format.

>>> get_datetime_format(locale='en_US')
u'{1}, {0}'

:param format: the format to use, one of "full", "long", "medium", or
               "short"
:param locale: the `Locale` object, or a locale string. Defaults to the system time locale.
N)r	rar�datetime_formats)rr^�patternss&& r�get_datetime_formatr�us4���|�|�F�-�-�g�.�?�?�H�
������rc�$�V^8�dQhRRRRRR/#rwr)rs"rrr�ryrc�l�\P!T;'g\4PV,#)u�Return the time formatting patterns used by the locale for the specified
format.

>>> get_time_format(locale='en_US')
<DateTimePattern u'h:mm:ss a'>
>>> get_time_format('full', locale='de_DE')
<DateTimePattern u'HH:mm:ss zzzz'>

:param format: the format to use, one of "full", "long", "medium", or
               "short"
:param locale: the `Locale` object, or a locale string. Defaults to the system time locale.
)r	rar�time_formatsr|s&&r�get_time_formatr��r~rc
�,�V^8�dQhRRRRRRRRR	R
/#)rr*rr[z4Literal['long', 'short', 'iso8601', 'iso8601_short']r^r_�return_z�boolrr.r)rs"rrr�s:��9,�9,��9,�?�9,�
 �9,��	9,�
	�9,rc��\\V44p\P!T;'g\4pVP
P
V4pVP^,^<,^<,VP,p\VR4wreV'dV^8Xd
V^8XdR#V^8XdVR8Xd
RV,#VR8XgVR8XdRpM$VR8XdRpMVPR	,R,pWvV^<,3,#)
a�Return the timezone associated with the given `datetime` object formatted
as string indicating the offset from GMT.

>>> from datetime import datetime
>>> dt = datetime(2007, 4, 1, 15, 30)
>>> get_timezone_gmt(dt, locale='en')
u'GMT+00:00'
>>> get_timezone_gmt(dt, locale='en', return_z=True)
'Z'
>>> get_timezone_gmt(dt, locale='en', width='iso8601_short')
u'+00'
>>> tz = get_timezone('America/Los_Angeles')
>>> dt = _localize(tz, datetime(2007, 4, 1, 15, 30))
>>> get_timezone_gmt(dt, locale='en')
u'GMT-07:00'
>>> get_timezone_gmt(dt, 'short', locale='en')
u'-0700'
>>> get_timezone_gmt(dt, locale='en', width='iso8601_short')
u'-07'

The long format depends on the locale, for example in France the acronym
UTC string is used instead of GMT:

>>> get_timezone_gmt(dt, 'long', locale='fr_FR')
u'UTC-07:00'

.. versionadded:: 0.9

:param datetime: the ``datetime`` object; if `None`, the current date and
                 time in UTC is used
:param width: either "long" or "short" or "iso8601" or "iso8601_short"
:param locale: the `Locale` object, or a locale string. Defaults to the system time locale.
:param return_z: True or False; Function returns indicator "Z"
                 when local time offset is 0
��Z�
iso8601_shortz%+03d�shortz	%+03d%02d�iso8601z
%+03d:%02d�gmt)rHr3r	rarr"�	utcoffsetrg�seconds�divmod�zone_formats)r*r[r^r��offsetr��hours�patterns&&&&    r�get_timezone_gmtr��s���R'�}�X�'>�?�H�
�\�\�&�+�+�G�
,�F�
�_�_�
&�
&�x�
0�F��k�k�B���#�b�(�6�>�>�9�G��G�T�*�N�E��E�Q�J�7�a�<��	�A��%�?�2�����	�'�	�U�o�5���	�)�	����%�%�e�,�|�;���W��]�+�+�+rc�(�V^8�dQhRRRRRRRR/#)	rr(rr^r_�return_cityr�rr.r)rs"rrr�s6��M�M��M��M��M�	�	Mrc��\P!T;'g\4p\V4p\	R4PW34pVPPV/4pVPR,p\	R4PV4pWaP9dRpVPV,pV'g:V'd2\\	R4PV.44^8Xd	WW,#VPR,pRV9dVR,p	M�\	R4PV4p
VPPV
/4pRV9dVR,p	MCR	V9d+VPR	^4^,PR
R4p	MVPR
R4p	V'dV	#WXRV	R
V/,,#)uReturn a representation of the given timezone using "location format".

The result depends on both the local display name of the country and the
city associated with the time zone:

>>> tz = get_timezone('America/St_Johns')
>>> print(get_timezone_location(tz, locale='de_DE'))
Kanada (St. John’s) (Ortszeit)
>>> print(get_timezone_location(tz, locale='en'))
Canada (St. John’s) Time
>>> print(get_timezone_location(tz, locale='en', return_city=True))
St. John’s
>>> tz = get_timezone('America/Mexico_City')
>>> get_timezone_location(tz, locale='de_DE')
u'Mexiko (Mexiko-Stadt) (Ortszeit)'

If the timezone is associated with a country that uses only a single
timezone, just the localized country name is returned:

>>> tz = get_timezone('Europe/Berlin')
>>> get_timezone_name(tz, locale='de_DE')
u'Mitteleurop\xe4ische Zeit'

.. versionadded:: 0.9

:param dt_or_tzinfo: the ``datetime`` or ``tzinfo`` object that determines
                     the timezone; if `None`, the current date and time in
                     UTC is assumed
:param locale: the `Locale` object, or a locale string. Defaults to the system time locale.
:param return_city: True or False, if True then return exemplar city (location)
                    for the time zone
:return: the localized timezone name using location format

�zone_aliases�region�zone_territories�ZZ�territory_zones�fallback�city�
meta_zones�/�_� �0�1)
r	rarr;r�get�
time_zonesr��territories�lenr��splitr$)r(r^r�r8�info�
region_format�	territory�territory_name�fallback_format�	city_name�metazone�
metazone_infos&&&         r�get_timezone_locationr��s���N�\�\�&�+�+�G�
,�F���%�D��n�%�)�)�$�5�D���� � ��r�*�D��'�'��1�M��-�.�2�2�4�8�I��*�*�*��	��'�'�	�2�N��9��Z�8I�-J�-N�-N�y�Z\�-]�)^�bc�)c��-�-��)�)�*�5�O�
��~���L�	��l�+�/�/��5���)�)�-�-�h��;�
��]�"�%�f�-�I�
�D�[��
�
�3��*�1�-�5�5�c�3�?�I����S�#�.�I������Y��^�/���rc�4�V^8�dQhRRRRRRRRR	R
RRRR
/#)rr(rr[zLiteral['long', 'short']�uncommonr�r^r_�zone_variantz1Literal['generic', 'daylight', 'standard'] | None�return_zonerr.r)rs"rrr(sX��w>�w>��w>�#�w>��w>�
 �	w>�
D�w>��
w>�	�w>rc��\V4wrg\P!T;'g\4p\	V4pVf&VfRpM0VPV4p	V	'dRMRpMVR9d\
R4h\R4PW�4pV'dV#VPPV/4p
W9dWJV,9dW�,V,#\R4PV4pV'dwVPPV/4pW9dUW�,PV4p
VR8Xd-V
\8Xd"VPR/4PV4p
V
'dV
#Ve\WaVR	7#\WR
7#)a�Return the localized display name for the given timezone. The timezone
may be specified using a ``datetime`` or `tzinfo` object.

>>> from datetime import time
>>> dt = time(15, 30, tzinfo=get_timezone('America/Los_Angeles'))
>>> get_timezone_name(dt, locale='en_US')  # doctest: +SKIP
u'Pacific Standard Time'
>>> get_timezone_name(dt, locale='en_US', return_zone=True)
'America/Los_Angeles'
>>> get_timezone_name(dt, width='short', locale='en_US')  # doctest: +SKIP
u'PST'

If this function gets passed only a `tzinfo` object and no concrete
`datetime`,  the returned display name is independent of daylight savings
time. This can be used for example for selecting timezones, or to set the
time of events that recur across DST changes:

>>> tz = get_timezone('America/Los_Angeles')
>>> get_timezone_name(tz, locale='en_US')
u'Pacific Time'
>>> get_timezone_name(tz, 'short', locale='en_US')
u'PT'

If no localized display name for the timezone is available, and the timezone
is associated with a country that uses only a single timezone, the name of
that country is returned, formatted according to the locale:

>>> tz = get_timezone('Europe/Berlin')
>>> get_timezone_name(tz, locale='de_DE')
u'Mitteleurop\xe4ische Zeit'
>>> get_timezone_name(tz, locale='pt_BR')
u'Hor\xe1rio da Europa Central'

On the other hand, if the country uses multiple timezones, the city is also
included in the representation:

>>> tz = get_timezone('America/St_Johns')
>>> get_timezone_name(tz, locale='de_DE')
u'Neufundland-Zeit'

Note that short format is currently not supported for all timezones and
all locales.  This is partially because not every timezone has a short
code in every locale.  In that case it currently falls back to the long
format.

For more information see `LDML Appendix J: Time Zone Display Names
<https://www.unicode.org/reports/tr35/#Time_Zone_Fallback>`_

.. versionadded:: 0.9

.. versionchanged:: 1.0
   Added `zone_variant` support.

:param dt_or_tzinfo: the ``datetime`` or ``tzinfo`` object that determines
                     the timezone; if a ``tzinfo`` object is used, the
                     resulting display name will be generic, i.e.
                     independent of daylight savings time; if `None`, the
                     current date in UTC is assumed
:param width: either "long" or "short"
:param uncommon: deprecated and ignored
:param zone_variant: defines the zone variation to return.  By default the
                       variation is defined from the datetime object
                       passed in.  If no datetime object is passed in, the
                       ``'generic'`` variation is assumed.  The following
                       values are valid: ``'generic'``, ``'daylight'`` and
                       ``'standard'``.
:param locale: the `Locale` object, or a locale string. Defaults to the system time locale.
:param return_zone: True or False. If true then function
                    returns long time zone ID
�generic�daylight�standardzInvalid zone variationr�r�r��longrt�r^)r�r�r�)r5r	rarr;�dst�
ValueErrorrr�r�r��NO_INHERITANCE_MARKERr�r�)r(r[r�r^r�r�rr"r8r�r�r�r��names&&&&&&        r�get_timezone_namer�(s]��\$�L�1�J�B�
�\�\�&�+�+�G�
,�F���%�D���
�:�$�L��*�*�R�.�C�),�:�*�L��B�B��5�6�6��n�%�)�)�$�5�D������� � ��r�*�D��}��e��4��{�<�(�(��,�'�+�+�D�1�H���)�)�-�-�h��;�
��!� �'�+�+�L�9�D����D�,A�$A�%�(�(���4�8�8��F�����
�~����?�?� ��=�=rc�(�V^8�dQhRRRRRRRR/#)	rrB�datetime.date | Noner�_PredefinedTimeFormat | strr^r_rr.r)rs"rrr�s0��#'�#'�
�#'�'�#'�
 �#'�	�	#'rc�N�Vf \PP4pM0\V\P4'dVP4p\P
!T;'g\4pVR9d
\WR7p\V4pVPW4#)a�Return a date formatted according to the given pattern.

>>> from datetime import date
>>> d = date(2007, 4, 1)
>>> format_date(d, locale='en_US')
u'Apr 1, 2007'
>>> format_date(d, format='full', locale='de_DE')
u'Sonntag, 1. April 2007'

If you don't want to use the locale default formats, you can specify a
custom date pattern:

>>> format_date(d, "EEE, MMM d, ''yy", locale='en')
u"Sun, Apr 1, '07"

:param date: the ``date`` or ``datetime`` object; if `None`, the current
             date is used
:param format: one of "full", "long", "medium", or "short", or a custom
               date/time pattern
:param locale: a `Locale` object or a locale identifier. Defaults to the system time locale.
r���fullr��mediumr�)
r*rBrCr-r	rarr}�
parse_pattern�apply)rBrr^r�s&&& r�format_dater��s{��4�|��}�}�"�"�$��	�D�(�+�+�	,�	,��y�y�{��
�\�\�&�+�+�G�
,�F�
�4�4� ��7���F�#�G��=�=��&�&rc
�,�V^8�dQhRRRRRRRRR	R
/#)rr*rrr�r"rEr^r_rr.r)rs"rrr�s:��'=�'=��'=�'�'=�
#�'=�
 �	'=�
	�'=rc
�\�\\V4V4p\P!T;'g\4pVR9dT\WR7P
RR4P
R\WRVR74P
R\WVR74#\V4PW4#)	u�Return a date formatted according to the given pattern.

>>> from datetime import datetime
>>> dt = datetime(2007, 4, 1, 15, 30)
>>> format_datetime(dt, locale='en_US')
u'Apr 1, 2007, 3:30:00\u202fPM'

For any pattern requiring the display of the timezone:

>>> format_datetime(dt, 'full', tzinfo=get_timezone('Europe/Paris'),
...                 locale='fr_FR')
'dimanche 1 avril 2007, 17:30:00 heure d’été d’Europe centrale'
>>> format_datetime(dt, "yyyy.MM.dd G 'at' HH:mm:ss zzz",
...                 tzinfo=get_timezone('America/New_York'), locale='en')
u'2007.04.01 AD at 11:30:00 EDT'

:param datetime: the `datetime` object; if `None`, the current date and
                 time is used
:param format: one of "full", "long", "medium", or "short", or a custom
               date/time pattern
:param tzinfo: the timezone to apply to the time for display
:param locale: a `Locale` object or a locale identifier. Defaults to the system time locale.
r��'��{0}N�r"r^�{1}r�)rHr3r	rarr�r$�format_timer�r�r�)r*rr"r^s&&&&r�format_datetimer��s���:'�}�X�'>��G�H�
�\�\�&�+�+�G�
,�F�
�4�4�"�6�9�
�W�S�"�
�
�W�U�K���/5�7�8�
�W�U�K���H�
I�		J��V�$�*�*�8�<�<rc
�,�V^8�dQhRRRRRRRRR	R
/#)rr2z0datetime.time | datetime.datetime | float | Nonerr�r"rEr^r_rr.r)rs"rrr�sH��GN�GN�
:�GN�'�GN�
#�GN�
 �	GN�
	�GNrc�"�\V\P4'dVP4MRp\W4p\P
!T;'g\4pVR9d
\WR7p\V4PWVR7#)u	Return a time formatted according to the given pattern.

>>> from datetime import datetime, time
>>> t = time(15, 30)
>>> format_time(t, locale='en_US')
u'3:30:00\u202fPM'
>>> format_time(t, format='short', locale='de_DE')
u'15:30'

If you don't want to use the locale default formats, you can specify a
custom time pattern:

>>> format_time(t, "hh 'o''clock' a", locale='en')
u"03 o'clock PM"

For any pattern requiring the display of the time-zone a
timezone has to be specified explicitly:

>>> t = datetime(2007, 4, 1, 15, 30)
>>> tzinfo = get_timezone('Europe/Paris')
>>> t = _localize(tzinfo, t)
>>> format_time(t, format='full', tzinfo=tzinfo, locale='fr_FR')
'15:30:00 heure d’été d’Europe centrale'
>>> format_time(t, "hh 'o''clock' a, zzzz", tzinfo=get_timezone('America/New_York'),
...             locale='en')
u"09 o'clock AM, Eastern Daylight Time"

As that example shows, when this function gets passed a
``datetime.datetime`` value, the actual time in the formatted string is
adjusted to the timezone specified by the `tzinfo` parameter. If the
``datetime`` is "naive" (i.e. it has no associated timezone information),
it is assumed to be in UTC.

These timezone calculations are **not** performed if the value is of type
``datetime.time``, as without date information there's no way to determine
what a given time would translate to in a different timezone without
information about whether daylight savings time is in effect or not. This
means that time values are left as-is, and the value of the `tzinfo`
parameter is only used to display the timezone name if needed:

>>> t = time(15, 30)
>>> format_time(t, format='full', tzinfo=get_timezone('Europe/Paris'),
...             locale='fr_FR')  # doctest: +SKIP
u'15:30:00 heure normale d\u2019Europe centrale'
>>> format_time(t, format='full', tzinfo=get_timezone('America/New_York'),
...             locale='en_US')  # doctest: +SKIP
u'3:30:00\u202fPM Eastern Standard Time'

:param time: the ``time`` or ``datetime`` object; if `None`, the current
             time in UTC is used
:param format: one of "full", "long", "medium", or "short", or a custom
               date/time pattern
:param tzinfo: the time-zone to apply to the time for display
:param locale: a `Locale` object or a locale identifier. Defaults to the system time locale.
Nr�)�reference_dater�)
r-r*rBrMr	rarr�r�r�)r2rr"r^�ref_dates&&&& rr�r��sr��@)��x�/@�/@�A�A�t�y�y�{�t�H��T�"�D�
�\�\�&�+�+�G�
,�F�
�4�4� ��7���� �&�&�t�H�&�M�Mrc�0�V^8�dQhRRRRRRRRR	R
RR/#)r�skeletonr.r*rr"rE�fuzzyr�r^r_rr)rs"rrr<sD��/=�/=��/=��/=�
#�/=��	/=�

 �/=�	�
/=rc���\P!T;'g\4pV'd&WP9d\	WP4pVPV,p\WW$4#)amReturn a time and/or date formatted according to the given pattern.

The skeletons are defined in the CLDR data and provide more flexibility
than the simple short/long/medium formats, but are a bit harder to use.
The are defined using the date/time symbols without order or punctuation
and map to a suitable format for the given locale.

>>> from datetime import datetime
>>> t = datetime(2007, 4, 1, 15, 30)
>>> format_skeleton('MMMEd', t, locale='fr')
u'dim. 1 avr.'
>>> format_skeleton('MMMEd', t, locale='en')
u'Sun, Apr 1'
>>> format_skeleton('yMMd', t, locale='fi')  # yMMd is not in the Finnish locale; yMd gets used
u'1.4.2007'
>>> format_skeleton('yMMd', t, fuzzy=False, locale='fi')  # yMMd is not in the Finnish locale, an error is thrown
Traceback (most recent call last):
    ...
KeyError: yMMd
>>> format_skeleton('GH', t, fuzzy=True, locale='fi_FI')  # GH is not in the Finnish locale and there is no close match, an error is thrown
Traceback (most recent call last):
    ...
KeyError: None

After the skeleton is resolved to a pattern `format_datetime` is called so
all timezone processing etc is the same as for that.

:param skeleton: A date time skeleton as defined in the cldr data.
:param datetime: the ``time`` or ``datetime`` object; if `None`, the current
             time in UTC is used
:param tzinfo: the time-zone to apply to the time for display
:param fuzzy: If the skeleton is not found, allow choosing a skeleton that's
              close enough to it. If there is no close match, a `KeyError`
              is thrown.
:param locale: a `Locale` object or a locale identifier. Defaults to the system time locale.
)r	rar�datetime_skeletons�match_skeletonr�)r�r*r"r�r^rs&&&&& r�format_skeletonr�<sV��V�\�\�&�+�+�G�
,�F���!:�!:�:�!�(�,E�,E�F��
�
&�
&�x�
0�F��8�V�<�<rztuple[tuple[str, int], ...]�TIMEDELTA_UNITSc�4�V^8�dQhRRRRRRRRR	R
RRR
R/#)r�deltazdatetime.timedelta | int�granularityzCLiteral['year', 'month', 'week', 'day', 'hour', 'minute', 'second']�	thresholdr?�
add_directionr�rz,Literal['narrow', 'short', 'medium', 'long']r^r_rr.r)rs"rrrysW��v�v�#�v�T�v��v��	v�

9�v�
 �
v�	�vrc�|aaa
aa�SR9d\R4hSR8Xd \P!R\^R7Ro\	V\
P4'd/\VPR,VP,4oMVo\P!T;'g\4pVPR,o
VPR,oVV
VVV3R	lp\F�wrx\S4V,p	W�8�g	Wq8XgK%Wq8XdV	^8�d
\!^V	4p	\\#V	44p	VP%V	4p
R
pV!V4F=pVfK	VP'V
4;'gVP'R4pV'gK=M	VfR#VP)R
\+V	44u#	R#)ah	Return a time delta according to the rules of the given locale.

>>> from datetime import timedelta
>>> format_timedelta(timedelta(weeks=12), locale='en_US')
u'3 months'
>>> format_timedelta(timedelta(seconds=1), locale='es')
u'1 segundo'

The granularity parameter can be provided to alter the lowest unit
presented, which defaults to a second.

>>> format_timedelta(timedelta(hours=3), granularity='day', locale='en_US')
u'1 day'

The threshold parameter can be used to determine at which value the
presentation switches to the next higher unit. A higher threshold factor
means the presentation will switch later. For example:

>>> format_timedelta(timedelta(hours=23), threshold=0.9, locale='en_US')
u'1 day'
>>> format_timedelta(timedelta(hours=23), threshold=1.1, locale='en_US')
u'23 hours'

In addition directional information can be provided that informs
the user if the date is in the past or in the future:

>>> format_timedelta(timedelta(hours=1), add_direction=True, locale='en')
u'in 1 hour'
>>> format_timedelta(timedelta(hours=-1), add_direction=True, locale='en')
u'1 hour ago'

The format parameter controls how compact or wide the presentation is:

>>> format_timedelta(timedelta(hours=3), format='short', locale='en')
u'3 hr'
>>> format_timedelta(timedelta(hours=3), format='narrow', locale='en')
u'3h'

:param delta: a ``timedelta`` object representing the time difference to
              format, or the delta in seconds as an `int` value
:param granularity: determines the smallest unit that should be displayed,
                    the value can be one of "year", "month", "week", "day",
                    "hour", "minute" or "second"
:param threshold: factor that determines at which point the presentation
                  switches to the next higher unit
:param add_direction: if this flag is set to `True` the return value will
                      include directional information.  For instance a
                      positive timedelta will include the information about
                      it being in the future, a negative will be information
                      about the value being in the past.
:param format: the format, can be "narrow", "short" or "long". (
               "medium" is deprecated, currently converted to "long" to
               maintain compatibility)
:param locale: a `Locale` object or a locale identifier. Defaults to the system time locale.
r�r�z1Format must be one of "narrow", "short" or "long"zU"medium" value for format param of format_timedelta is deprecated. Use "long" instead)�category�
stacklevel�Q�date_fields�
unit_patternsc3�6<"�S'dFSPVRS24;'g
SV,pS^8�d
VR,x�MVR,x�RV2pSPV/4pVPS4x�SR9dVPR4x�R#R#5i)�-�future�pastz	duration-r�N)r��narrow)r�)�a_unit�unit_rel_patterns�	unit_patsr�r�rr�r�s&  �����r�_iter_patterns�(format_timedelta.<locals>._iter_patterns�s������"-���F�8�1�V�H�1E�!F�!]�!]�+�V\�J]���!�|�'��1�1�'��/�/��V�H�%��!�%�%�f�b�1�	��m�m�F�#�#�
�'�'��-�-��(�(�(�s�%B�A0BN�otherr�r�)r�r�r�r�)�	TypeError�warnings�warn�DeprecationWarningr-r*�	timedeltar0rgr�r	rar�_datar��abs�max�round�plural_formr�r$r.)r�r�r�r�rr^r��unit�
secs_per_unit�valuerr�r�r�r�r�s&&&ff&       @@@r�format_timedeltar	yss���~�:�:��K�L�L�
����
�
�
1�'��		
����%��+�+�,�,��u�z�z�E�)�U�]�]�:�;����
�\�\�&�+�+�G�
,�F��,�,�}�-�K��L�L��1�M�)�)�& /����G��}�,�����!4��"�u�q�y��A�u�
����e��%�E� �,�,�U�3�K��G�*�4�0���'�&�l�l�;�7�P�P�8�<�<��;P�G��w��	1�����?�?�5�#�e�*�5�5�! /�$rc�0�V^8�dQhRRRRRRRRRR	R
R/#)r�startr�endr��
str | Noner"rEr^r	rr.r)rs"rrr�sD������	����
#�	�

��	�
rc�aaa�SSP9d
VVV3RlpM�\;QJdRW34F'dKRM	RM!RW344'dV3RlpMK\;QJdRW34F'dKRM	RM!RW344'd	VV3RlpMVV3RlpV!V4pV!V4pWg8Xd	V!V4#SPPRR	4P	R
V4P	RV4#)c�"<�\SVSSR7#�r�)r�)rr^r�r"s&���r�<lambda>�+_format_fallback_interval.<locals>.<lambda>�s���O�H�b�&��Prc3�"�TFFp\V\P4;'d \V\P4'*x�KH	R#5i�N)r-r*rB��.0�ds& r�	<genexpr>�,_format_fallback_interval.<locals>.<genexpr>�s9���k�^j�YZ�j��H�M�M�*�S�S�:�a��AR�AR�3S�/S�S�^j��
�%A�(AFTc�<�\VSR7#r)r�)rr^s&�rrr�s���K��6�:rc3�"�TFFp\V\P4;'d \V\P4'*x�KH	R#5ir)r-r*r2rBrs& rrr�s7���g�Zf�UV�j��H�M�M�*�O�O�:�a����3O�/O�O�Zf�rc� <�\VSSR7#�r�)r��rr^r"s&��rrr�s���K��6�&�Irc� <�\VSSR7#r)r�rs&��rrrs���O�B�v�f�MrNz{0}-{1}r�r�)r��all�interval_formatsr�r$)rrr�r"r^r�formatted_start�
formatted_ends&&fff   r�_format_fallback_intervalr%�s�����6�,�,�,�P��	��k�_d�^j�k����k�_d�^j�k�	k�	k�:��	��g�[`�Zf�g����g�[`�Zf�g�	g�	g�I��M���U�m�O��3�K�M��'��e�}��	���#�#�D�)�4�����'����}�%�rc�4�V^8�dQhRRRRRRRRRR	R
RRR
/#)rrrrr�r
r"rEr�r�r^r_rr.r)rs"rrrs`��fK�fK��fK�	�fK��fK�
#�	fK�
�fK�
 �
fK�	�fKrc	�a�\P!S;'g\4oSPpW&9g	V'g4V'dV'd
\	W&4pMRpV'g\WW#S4#Wb,pW8Xd\
W W4SR7#\\V4VR7p\\V4VR7p\VSR7p\VSR7p	\F^p
W�9gKVPV
4V	PV
48wgK2RPV3Rl\Wz,W3444u#	\WW#S4#)u�
Format an interval between two instants according to the locale's rules.

>>> from datetime import date, time
>>> format_interval(date(2016, 1, 15), date(2016, 1, 17), "yMd", locale="fi")
u'15.–17.1.2016'

>>> format_interval(time(12, 12), time(16, 16), "Hm", locale="en_GB")
'12:12–16:16'

>>> format_interval(time(5, 12), time(16, 16), "hm", locale="en_US")
'5:12 AM – 4:16 PM'

>>> format_interval(time(16, 18), time(16, 24), "Hm", locale="it")
'16:18–16:24'

If the start instant equals the end instant, the interval is formatted like the instant.

>>> format_interval(time(16, 18), time(16, 18), "Hm", locale="it")
'16:18'

Unknown skeletons fall back to "default" formatting.

>>> format_interval(date(2015, 1, 1), date(2017, 1, 1), "wzq", locale="ja")
'2015/01/01~2017/01/01'

>>> format_interval(time(16, 18), time(16, 24), "xxx", locale="ja")
'16:18:00~16:24:00'

>>> format_interval(date(2016, 1, 15), date(2016, 1, 17), "xxx", locale="de")
'15.01.2016 – 17.01.2016'

:param start: First instant (datetime/date/time)
:param end: Second instant (datetime/date/time)
:param skeleton: The "skeleton format" to use for formatting.
:param tzinfo: tzinfo to use (if none is already attached)
:param fuzzy: If the skeleton is not found, allow choosing a skeleton that's
              close enough to it.
:param locale: A locale object or identifier. Defaults to the system time locale.
:return: Formatted interval
N)r�r^r!r�r�c3�^<"�TF"wr\V4PVS4x�K$	R#5ir)r�r�)rr�r=r^s&  �rr�"format_interval.<locals>.<genexpr>ms4�����:�%�G��g�&�,�,�W�f�=�=�9�s�*-)r	rarr"r�r%r�rHr3�DateTimeFormat�PATTERN_CHAR_ORDER�extract�join�zip)rrr�r"r�r^r"�skel_formats�	start_fmt�end_fmt�fields&&&&&f     r�format_intervalr3s���b�\�\�&�+�+�G�
,�F��.�.���'�x���%�h�A�H��H��,�U��6�R�R�#�-�L��|��x��F�S�S�#�M�%�$8��H�E�
!�-��"4�V�
D�C��u�V�4�I��S��0�G�$��� �Y�%6�%6�u�%=����QV�AW�%W��7�7���|�*�U�L�9���
�	$�%�U��6�J�Jrc
�,�V^8�dQhRRRRRRRRR	R
/#)rr2rr"rE�typezLiteral['selection'] | Noner^r_rr.r)rs"rrrxsA��I�I�
�I�"�I�&�I�
 �	I�
	�Irc���\W4p\VP^<,^<,VP^<,,VP,4p\
P!T;'g\4pVPPV/4P4pVF+wrgVF pRV9gKVR,V8XgKVuu#	K-	VF�wrgVF�pRV9d{RV9dtVR,VR,8d(VR,Tu;8:dVR,8d
MM>Vuu#M7VR,Tu;8:dR8gM^Tu;8:dVR,8d
MMVuu#R;r�RV9dWHR,8�dRp	RV9dWHR,8:dRp
RV9dWHR,8dRp
RV9d\R	4hV	'gK�V
'gK�Vuu#	EK	VR
8dR#R#)
uZ
Get the day period ID for a given time.

This ID can be used as a key for the period name dictionary.

>>> from datetime import time
>>> get_period_names(locale="de")[get_period_id(time(7, 42), locale="de")]
u'Morgen'

>>> get_period_id(time(0), locale="en_US")
u'midnight'

>>> get_period_id(time(0), type="selection", locale="en_US")
u'night1'

:param time: The time to inspect.
:param tzinfo: The timezone for the time. See ``format_time``.
:param type: The period type to use. Either "selection" or None.
             The selection type is used for selecting among phrases such as
             “Your email arrived yesterday evening” or “Your email arrived last night”.
:param locale: the `Locale` object, or a locale string. Defaults to the system time locale.
:return: period ID. Something is always returned -- even if it's just "am" or "pm".
�at�from�beforer�FT�to�afterz$'after' is deprecated as of CLDR 29.i���am�pm)rMr0�hour�minute�secondr	rar�day_period_rulesr��items�NotImplementedError)r2r"r5r^�seconds_past_midnight�rulesets�rule_id�rules�rule�start_ok�end_oks&&&&       r�
get_period_idrKxs���:�T�"�D���	�	�B��� 3�d�k�k�B�6F� F���� T�U��
�\�\�&�+�+�G�
,�F��&�&�*�*�4��4�:�:�<�H�"����D��t�|��T�
�.C� C����#�
#����D���~�(�d�"2���<�$�x�.�0��F�|�'<�M�t�H�~�M�&��N��F�|�'<�D�u�D��!6�G��h��G�&�� %�%�H���~�"7��<�"G����t�|� 5�d�� C����4��$9��N�$J����$��)�*P�Q�Q��x�F�F���3�#�8�u�$��rc��]tRtRtRtR#)�
ParseErrori�rN)�__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__rrrrMrM�s��rrMc�(�V^8�dQhRRRRRRRR/#)	r�stringr.r^r_rr�rz
datetime.dater)rs"rrr�s6��J+�J+��J+��J+�
(�J+��	J+rc��\P!RV4pV'g\R4hVR9p\P!RV\PR7pV'd:V'd2\
P!\\VP44!#V'd\W!R7pM\V4pVPP4pVPR4pVP!R4p	V	^8dVPR4p	VPR	4p
\#VR
3V	R3V
R3.4p\%V4UU
u/uFwr�V
^,VbK	ppp
W;R
,,p\'V4^8XdR
\V4,M
\V4p\W;R,,4p\W;R,,4pV^8�dTTpp\
P!W�V4# \dEL[i;iuup
pi)a�Parse a date from a string.

If an explicit format is provided, it is used to parse the date.

>>> parse_date('01.04.2004', format='dd.MM.yyyy')
datetime.date(2004, 4, 1)

If no format is given, or if it is one of "full", "long", "medium",
or "short", the function first tries to interpret the string as
ISO-8601 date format and then uses the date format for the locale
as a hint to determine the order in which the date fields appear in
the string.

>>> parse_date('4/1/04', locale='en_US')
datetime.date(2004, 4, 1)
>>> parse_date('01.04.2004', locale='de_DE')
datetime.date(2004, 4, 1)
>>> parse_date('2004-04-01', locale='en_US')
datetime.date(2004, 4, 1)
>>> parse_date('2004-04-01', locale='de_DE')
datetime.date(2004, 4, 1)
>>> parse_date('01.04.04', locale='de_DE', format='short')
datetime.date(2004, 4, 1)

:param string: the string containing the date
:param locale: a `Locale` object or a locale identifier
:param locale: a `Locale` object or a locale identifier. Defaults to the system time locale.
:param format: the format to use, either an explicit date format,
               or one of "full", "long", "medium", or "short"
               (see ``get_time_format``)
�(\d+)�No numbers were found in inputz^(\d{4})-?([01]\d)-?([0-3]\d)$)�flagsr|�y�m�lr�Y�M�Di�r�)�re�findallrM�match�ASCIIr*rB�mapr0�groupsr�r}r�r��lower�index�find�sorted�	enumerater�)rTr^r�numbers�use_predefined_format�	iso_alike�fmt�
format_str�year_idx�	month_idx�day_idx�indexes�idx�item�year�month�days&&&              r�
parse_daterx�s���H�j�j��6�*�G���9�:�:�"�&I�I�����:��r�x�x�1�I��*�	��=�=�#�c�9�+;�+;�+=�">�?�?���V�;���F�#�����"�"�$�J�����$�H�����$�I��1�}��$�$�S�)�	����s�#�G��x��o�	�3�'7�'�3��H�I�G�-6�w�-?�@�-?�	��t�A�w��|�-?�G�@�
�3�<� �D�"�4�y�A�~�4�#�d�)��3�t�9�D�����%�&�E�

�g�c�l�#�
$�C��r�z��%�s���=�=��c�*�*��5�	��	��As�(/G%�?G7�%G4�3G4c�(�V^8�dQhRRRRRRRR/#)	rrTr.r^r_rr�rrJr)rs"rrrs0��>/�>/��>/��>/�
(�>/��	>/rc�^�\P!RV4pV'g\R4hVR
9d\W!R7pM\	V4pVP
P
4pVPR4pV^8dVPR4pVPR4pVPR4;p^8d\Pp\VR3VR	3VR
3.4p	\V	4U
Uu/uFwr�V^,V
bK	p	p
p^pRV9dRVP
49d^p^;r�\W9R,,4V,p\V4^8�dA\W9R	,,4p
\V4^8�d\W9R
,,4p\P !W�V4#uupp
i)a�Parse a time from a string.

This function uses the time format for the locale as a hint to determine
the order in which the time fields appear in the string.

If an explicit format is provided, the function will use it to parse
the time instead.

>>> parse_time('15:30:00', locale='en_US')
datetime.time(15, 30)
>>> parse_time('15:30:00', format='H:mm:ss')
datetime.time(15, 30)

:param string: the string containing the time
:param locale: a `Locale` object or a locale identifier. Defaults to the system time locale.
:param format: the format to use, either an explicit time format,
               or one of "full", "long", "medium", or "short"
               (see ``get_time_format``)
:return: the parsed time
:rtype: `time`
rVrWr|�h�krZ�s�Hr]�S�ar=r�)r_r`rMr�r�r�rergrf�math�infrhrir0r�r*r2)rTr^rrjrmrn�hour_idx�min_idx�sec_idxrrrsrt�hour_offsetr?r@r>s&&&             r�
parse_timer�s|��4�j�j��6�*�G���9�:�:��4�4��V�;���F�#�����"�"�$�J����s�#�H��!�|��#�#�C�(�����s�#�G��?�?�3�'�'��1�,��(�(���x��o���~���~�F�G�G�-6�w�-?�@�-?�	��t�A�w��|�-?�G�@��K�
�j��T�V�\�\�^�3�����F��w�s�|�$�%��3�D�
�7�|�a���W�S�\�*�+���w�<�!������.�/�F��=�=��v�.�.��#As�(F)c�V�]tRtRtRRltRRltRRltRR	ltRRRlltR
t	R
#)rxiVc� �V^8�dQhRRRR/#)rr�r.rr*r)rs"rr�DateTimePattern.__annotate__Xs������^�rc	��WnW nR#r)r�r)�selfr�rs&&&r�__init__�DateTimePattern.__init__Xs�����rc��V^8�dQhRR/#�rrr.r)rs"rrr�\s��;�;�#�;rc	�P�R\V4PRVP:R2#)�<r��>)r5rNr��r�s&r�__repr__�DateTimePattern.__repr__\s'���4��:�&�&�'�q����(8��:�:rc��V^8�dQhRR/#r�r)rs"rrr�_s�����rc	��VPpV#r�r�)r��pats& r�__str__�DateTimePattern.__str___s���l�l���
rc� �V^8�dQhRRRR/#)rr�r*rr.r)rs"rrr�cs��#�#�^�#��#rc	�`�\V\4'g\#VPV,#r)r-r*�NotImplementedr)r�r�s&&r�__mod__�DateTimePattern.__mod__cs$���%��0�0�!�!��{�{�U�"�"rNc�(�V^8�dQhRRRRRRRR/#)	rr*�datetime.date | datetime.timer^r_r�r�rr.r)rs"rrr�hs8��G�G�/�G�$�G�-�	G�


�Grc	�(�V\WV4,#r)r*)r�r*r^r�s&&&&rr��DateTimePattern.applyhs���n�X�~�F�F�Fr)rr�r)
rNrOrPrQr�r�r�r�r�rRrrrrxrxVs"���;��#�
G�Grrxc��]tRtRtR+RRlltRRltRRltR	R
ltRRltR
Rlt	RRlt
RRltR,RRlltRRlt
RRltRRltRRltRtRRltR R!ltR+R"R#lltR$R%ltR&R'ltR+R(R)lltR*tR#)-r*iqNc�(�V^8�dQhRRRRRRRR/#)	rrr�r^zLocale | strr�r�r�Noner)rs"rr�DateTimeFormat.__annotate__ss2��-�-�,�-��-�-�	-�

�-rc	�~�\V\P\P\P34'gQh\V\P\P34'd%VPfVP\R7pWn\P!V4Vn
W0nR#)Nr!)r-r*rBr2r"r$r1rr	rar^r�)r�rr^r�s&&&&rr��DateTimeFormat.__init__ss|���%�(�-�-��1B�1B�H�M�M�!R�S�S�S�S��e�h�/�/����?�@�@�U�\�\�EY��M�M��M�-�E��
��l�l�6�*���,�rc� �V^8�dQhRRRR/#)rr�r.rr)rs"rrr��s��0D�0D��0D��0Drc	���V^,p\V4pVR8XdVPW#4#VR9dVPW#4#VR9dVPW#4#VR9dVP	W#4#VR9dVPW#4#VR8Xd'VP
VPPV4#VR8XdVPV4#VR8XdVP4#VR9dVPW#4#VR9dVPW#4#VR8XdbVPP^,^8XdVP
^V4#VP
VPP^,V4#VR8Xd'VP
VPPV4#VR8Xd.VP
VPP^,V4#VR8XdTVPP^8XdVP
^V4#VP
VPPV4#VR	8Xd'VP
VPPV4#VR
8Xd'VP
VPPV4#VR8XdVP!V4#VR8XdVP#V4#VR9dVP%W#4#\'R
V:24h)��Grr^�Fr{r~�Kr|rZr}r�AzUnsupported date/time field )rYr\�u)�Q�q)r]�L)�w�W)�ErW�c)r��b�B)�zr��v�V�x�X�O)r��
format_era�format_year�format_quarter�format_month�format_weekrrrw�format_day_of_year�format_day_of_week_in_month�format_weekday�
format_periodr>r?r@�format_frac_seconds�format_milliseconds_in_day�format_timezone�KeyError)r�r��char�nums&&  r�__getitem__�DateTimeFormat.__getitem__�s����A�w���$�i���3�;��?�?�4�-�-�
�_�
$��#�#�D�.�.�
�Z�
��&�&�t�1�1�
�Z�
��$�$�T�/�/�
�Z�
��#�#�D�.�.�
�S�[��;�;�t�z�z�~�~�s�3�3�
�S�[��*�*�3�/�/�
�S�[��3�3�5�5�
�_�
$��&�&�t�1�1�
�_�
$��%�%�d�0�0�
�S�[��z�z����#�q�(��{�{�2�s�+�+��{�{�4�:�:�?�?�R�#7��=�=�
�S�[��;�;�t�z�z����4�4�
�S�[��;�;�t�z�z����3�S�9�9�
�S�[��z�z���!�#��{�{�2�s�+�+��{�{�4�:�:�?�?�C�8�8�
�S�[��;�;�t�z�z�0�0�#�6�6�
�S�[��;�;�t�z�z�0�0�#�6�6�
�S�[��+�+�C�0�0�
�S�[��2�2�3�7�7�
�8�
8��'�'��2�2��9�$��B�C�Crc� �V^8�dQhRRRR/#)rr�r.rr0r)rs"rrr��s��c�c�C�c�C�crc	�0�\V4^,pVR8XdVPP#VR8XdVPP#VR8XdVPP#VR8XdVPP
#VR8Xd(VPP
^,;'g^#VR8XdVPP#VR8Xd#\VPP
^8�4#\RV:R	VP:24h)
r�rYr]rr~r{rZr�zNot implemented: extracting z from )	r.rrurvrwr>r?r0rC)r�r�s&&rr,�DateTimeFormat.extract�s����4�y��|���3�;��:�:�?�?�"�
�S�[��:�:�#�#�#�
�S�[��:�:�>�>�!�
�S�[��:�:�?�?�"�
�S�[��:�:�?�?�R�'�-�-�2�-�
�S�[��:�:�$�$�$�
�S�[��t�z�z���"�,�-�-�%�(D�T�H�F�SW�S]�S]�R`�&a�b�brc�$�V^8�dQhRRRRRR/#�rr�r.r�r0rr)rs"rrr��s!��6�6�s�6��6��6rc	��^R^R^R/\^V4,p\VPP^8�4p\	W0P
4V,#)��abbreviated�wider�)rr0rrurur^)r�r�r�r[�eras&&&  rr��DateTimeFormat.format_era�sJ���M�1�f�a��:�3�q�#�;�G���$�*�*�/�/�Q�&�'���U�K�K�0��5�5rc�$�V^8�dQhRRRRRR/#r�r)rs"rrr��s!������#��#�rc	���VPPpVP4'd�VPPpV^8Xd;VPP^8d VP4^48�dV^,pM@V^8Xd:VPP^8�dVP4^8:d
V^,
pVP
W24pV^8XdVRRpV#)�N���)rru�isupperrvrw�get_week_of_yearr)r�r�r�rrvrus&&&   rr��DateTimeFormat.format_year�s����
�
�����<�<�>�>��J�J�$�$�E���z�d�j�j�n�n�q�0�T�5J�5J�5L�PR�5R���
���"�������"�!4��9N�9N�9P�TU�9U���
���{�{�5�&���!�8����9�D��rc�$�V^8�dQhRRRRRR/#r�r)rs"rrr��s&��G�G�3�G�S�G�S�Grc	���VPP^,
^,^,pV^8:dRW#3,#^R^R^R/V,pRRRR/V,p\WEVP4V,#)	r��%0*dr�r�r�r�rr��stand-alone)rrvrpr^)r�r�r��quarterr[r]s&&&   rr��DateTimeFormat.format_quarter�st���:�:�#�#�a�'�A�-��1���!�8��S�N�*�*��M�1�f�a��:�3�?����#�}�5�d�;�� �����=�g�F�Frc�$�V^8�dQhRRRRRR/#r�r)rs"rrr��s&��N�N��N�3�N�3�Nrc	���V^8:dRW PP3,#^R^R^R/V,pRRRR/V,p\W4VP4VPP,#)	rr�r�r�r�r]rr�r�)rrvrlr^)r�r�r�r[r]s&&&  rr��DateTimeFormat.format_month�sk���!�8��S�*�*�"2�"2�3�3�3��M�1�f�a��:�3�?����#�}�5�d�;���u�t�{�{�;�D�J�J�<L�<L�M�Mrc�$�V^8�dQhRRRRRR/#r�r)rs"rrr��s!������#��#�rc	��VP4'd"VP4pVPW24#VP4p\	V4#r)�islowerr�r�get_week_of_monthr.)r�r�r��weeks&&& rr��DateTimeFormat.format_week�sB���<�<�>�>��(�(�*�D��;�;�t�)�)��)�)�+�D��t�9�rc�$�V^8�dQhRRRRRR/#r�r)rs"rrr��s&��$C�$C�3�$C�3�$C�s�$Crc
��V^8duVP4'd]^VPP,
VPP	4,pVPV^,^,V4#^pVPP	4p^R^R^R^R/V,pVR8XdRMRp\
WVVP4V,#)a�
Return weekday from parsed datetime according to format pattern.

>>> from datetime import date
>>> format = DateTimeFormat(date(2016, 2, 28), Locale.parse('en_US'))
>>> format.format_weekday()
u'Sunday'

'E': Day of week - Use one through three letters for the abbreviated day name, four for the full (wide) name,
     five for the narrow name, or six for the short name.
>>> format.format_weekday('E',2)
u'Sun'

'e': Local day of week. Same as E except adds a numeric value that will depend on the local starting day of the
     week, using one or two letters. For this example, Monday is the first day of the week.
>>> format.format_weekday('e',2)
'01'

'c': Stand-Alone local day of week - Use one letter for the local numeric value (same as 'e'), three for the
     abbreviated day name, four for the full (wide) name, five for the narrow name, or six for the short name.
>>> format.format_weekday('c',1)
'1'

:param char: pattern format character ('e','E','c')
:param num: count of format character

r�r�r�r�r�r�r)r�r^�first_week_dayr�weekdayrrh)r�r�r�rr�r[r]s&&&    rr��DateTimeFormat.format_weekday�s���8��7��|�|�~�~��D�K�K�6�6�6����9K�9K�9M�M���{�{�5�1�9�q�=�#�6�6��C��*�*�$�$�&���M�1�f�a��1�g�F�s�K��#'�3�;�-�H���U�T�[�[�9�'�B�Brc� �V^8�dQhRRRR/#�rr�r0rr.r)rs"rrr�s��8�8�c�8�c�8rc	�B�VPVP4V4#r)r�get_day_of_year)r�r�s&&rr��!DateTimeFormat.format_day_of_years���{�{�4�/�/�1�3�7�7rc��V^8�dQhRR/#r�r)rs"rrr�s��2�2�S�2rc	�j�\VPP^,
^,^,4#)r�)r.rrwr�s&rr��*DateTimeFormat.format_day_of_week_in_months$���D�J�J�N�N�Q�&�1�,�q�0�1�1rc�$�V^8�dQhRRRRRR/#r�r)rs"rrr�s&��'O�'O�#�'O�C�'O�C�'Orc
�|�^R^R^R/\^V4,RRR.pVR8Xd#VPP^8�dRMRpRpM,\VPVPR7pVR	8XdRMR
pVF*p\WVVPR7pWG9gK"Wt,u#	\
RVR
VP24h)uv
Return period from parsed datetime according to format pattern.

>>> from datetime import datetime, time
>>> format = DateTimeFormat(time(13, 42), 'fi_FI')
>>> format.format_period('a', 1)
u'ip.'
>>> format.format_period('b', 1)
u'iltap.'
>>> format.format_period('b', 4)
u'iltapäivä'
>>> format.format_period('B', 4)
u'iltapäivällä'
>>> format.format_period('B', 5)
u'ip.'

>>> format = DateTimeFormat(datetime(2022, 4, 28, 6, 27), 'zh_Hant')
>>> format.format_period('a', 1)
u'上午'
>>> format.format_period('B', 1)
u'清晨'

:param char: pattern format character ('a', 'b', 'B')
:param num: count of format character

r�r�r�r�r=r<rr�r�r�)r]r[r^zCould not format period z in )rrr>rKr^rdr�)r�r�r��widths�periodr]r[�period_namess&&&     rr��DateTimeFormat.format_periods���6�m�Q���8�<�S��C�[�I��(�M�3���3�;�!�Z�Z�_�_��2�T��F��G�"�4�:�:�d�k�k�B�F�"&�#�+�h�=�G��E�+�G�QU�Q\�Q\�]�L��%�#�+�+���3�F�8�4����}�M�N�Nrc� �V^8�dQhRRRR/#r�r)rs"rrr�Cs��=�=�s�=�s�=rc
��VPPR,pVP\W!4^
V,,V4#)z}Return fractional seconds.

Rounds the time's microseconds to the precision given by the number         of digits passed in.
i@B)r�microsecondrr)r�r�rs&& rr��"DateTimeFormat.format_frac_secondsCs7���
�
�&�&��0���{�{�5��,�r�3�w�6��<�<rc	�*�VPPR,VPPR,,VPPR,,VPPR,,pVPW!4#)i�i`�i��6)rr
r@r?r>r)r�r��msecss&& rr��)DateTimeFormat.format_milliseconds_in_dayLsf���
�
�&�&�$�.����1B�1B�T�1I�I��J�J����%�&�(,�
�
���'�(A�B���{�{�5�&�&rc�$�V^8�dQhRRRRRR/#r�r)rs"rrr�Qs&��1T�1T�C�1T�c�1T�c�1Trc	��^R^R^R/\^V4,pVPpVP'd5\PP	VPVP4pVR8Xd\WCVPR7#VR8Xd7V^8Xd\WCVPRR7#\WCVPR7#VR	8Xd!V^8Xd\WCVPR7#R#VR
8Xd#\VPVVPR7#VR8Xd�V^8Xd$\VPVRVPR7#V^8Xd#\VPVPRR
7#V^8Xd#\VPVPRR7#\VPVPR7#VR8XdcV^8Xd\VRVPRR7#VR9d\VRVPRR7#VR9d\VRVPRR7#R#VR8Xd`V^8Xd\VRVPR7#VR9d\VRVPR7#VR9d\VRVPR7#R#R#)r�r�r�r�r�r�r�T)r^r�r�r�r�)r�r^)r^r�)r^r�r�r�)r[r^r�r�rtN)r�)r��)
rrr�r*rAr�r^r�r"r�)r�r�r�r[rs&&&  rr��DateTimeFormat.format_timezoneQs=���G�Q���9�5�c�!�S�k�B��
�
�
�������%�%�-�-�d�.A�.A�4�:�:�N�E��3�;�$�U�$�+�+�F�F�
�S�[��a�x�'��T�[�[�SW�X�X�#�E����E�E�
�S�[��a�x�'��T�[�[�I�I���S�[�$�U�\�\�5�,0�K�K�9�
9�
�S�[��a�x�(����u�26�t�{�{�L�L����(����d�k�k�W[�\�\����,�U�\�\�$�+�+�[_�`�`�(����d�k�k�J�J�
�S�[��a�x�'��_�T�[�[�15�7�7����'��W�T�[�[�15�7�7����'��Y�t�{�{�15�7�7���S�[��a�x�'��_�T�[�[�Y�Y����'��W�T�[�[�Q�Q����'��Y�t�{�{�S�S��rc�$�V^8�dQhRRRRRR/#)rrr�lengthr0rr.r)rs"rrr��s!��(�(�K�(��(��(rc	��RW!3,#)r�r)r�rrs&&&rr�DateTimeFormat.format�s�����'�'rc� �V^8�dQhRRRR/#)rrBr�rr0r)rs"rrr��s��>�>�$8�>�C�>rc	�v�Vf
VPpWP^^R7,
P^,#)N)rvrw)rr$rg)r�rBs&&rr��DateTimeFormat.get_day_of_year�s1���<��:�:�D��|�|�!��|�3�3�9�9�A�=�=rc��V^8�dQhRR/#�rrr0r)rs"rrr��s��
�
�#�
rc
�|�VPVP4pVPV4pV^8Xde\P!VPP
^,
^^4pVPVPV4VP
44pV#V^48�d�\P!VPP
^,^^4P
4pVP^V4^8XdF^ W@PP,
^,,
VPP8:d^pV#)zReturn the week of the year.)
r�r�get_week_numberr*rBrur�r^r�rw)r��day_of_yearr�rBr�s&    rr��DateTimeFormat.get_week_of_year�s����*�*�4�:�:�6���#�#�K�0���1�9��=�=������1�!4�b�"�=�D��'�'��(<�(<�T�(B�(,����8�D����B�Y��m�m�D�J�J�O�O�a�$7��A�>�F�F�H�G��#�#�A�w�/�1�4��'�K�K�$>�$>�>�!�C�C�t�z�z�~�~�U����rc��V^8�dQhRR/#rr)rs"rrr��s��4�4�3�4rc
�L�VPVPP4#)zReturn the week of the month.)rrrwr�s&rr�� DateTimeFormat.get_week_of_month�s���#�#�D�J�J�N�N�3�3rc�$�V^8�dQhRRRRRR/#)r�
day_of_periodr0�day_of_weekz
int | Nonerr)rs"rrr��s"����S��z��UX�rc
�F�VfVPP4pW PP,
V,
^,^,pV^8d
V^,
pW,^,
^,p^V,
VPP8�d
V^,
pV#)a�Return the number of the week of a day within a period. This may be
the week number in a year or the week number in a month.

Usually this will return a value equal to or greater than 1, but if the
first week of the period is so short that it actually counts as the last
week of the previous period, this function will return 0.

>>> date = datetime.date(2006, 1, 8)
>>> DateTimeFormat(date, 'de_DE').get_week_number(6)
1
>>> DateTimeFormat(date, 'en_US').get_week_number(6)
2

:param day_of_period: the number of the day in the period (usually
                      either the day of month or the day of year)
:param day_of_week: the week day; if omitted, the week day of the
                    current date is assumed
)rr�r^r��
min_week_days)r�r%r&�	first_day�week_numbers&&&  rr�DateTimeFormat.get_week_number�s���&���*�*�,�,�.�K� �;�;�#=�#=�=�"�#�%&�'�*+�,�	��q�=���N�I�$�0�1�4��:���y�=�D�K�K�5�5�5��1��K��r)r^r�rr)r�r)rNrOrPrQr�r�r,r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�rrRrrrr*r*qsv��-�0D�dc�&6�
�G�N��$C�L8�2�'O�R=�'�
1T�f(�>�

�4��rr*r�rYr\r�r�r�r]r�r�r�rr^r��gr�rWr�r�r�r�r{r~r�r|rZr}rr�r�r�r�r�r�r�r�zdict[str, list[int] | None]�
PATTERN_CHARS�(GyYuUQqMLlwWdDFgEecabBChHKkjJmsSAzZOvVXxc� �V^8�dQhRRRR/#)rr�zstr | DateTimePatternrrxr)rs"rrr�s��*�*�0�*�_�*rc�H�\V\4'dV#\V4#)a�Parse date, time, and datetime format patterns.

>>> parse_pattern("MMMMd").format
u'%(MMMM)s%(d)s'
>>> parse_pattern("MMM d, yyyy").format
u'%(MMM)s %(d)s, %(yyyy)s'

Pattern can contain literal strings in single quotes:

>>> parse_pattern("H:mm' Uhr 'z").format
u'%(H)s:%(mm)s Uhr %(z)s'

An actual single quote can be used by using two adjacent single quote
characters:

>>> parse_pattern("hh' o''clock'").format
u"%(hh)s o'clock"

:param pattern: the formatting pattern to parse
)r-rx�_cached_parse_patternr�s&rr�r��s!��*�'�?�+�+��� ��)�)ri)�maxsizec� �V^8�dQhRRRR/#)rr�r.rrxr)rs"rrr�s��5�5�3�5�?�5rc��.p\V4F�wr#VR8Xd$VPVPRR44K/VR8XdUVwrE\V,pV'dWV9d\	RWE,:24hVPRWE,,4K�\RV24h	\
VRPV44#)�chars�%z%%r2zInvalid length for field: z%%(%s)szUnknown token type: r�)�tokenize_pattern�appendr$r-r�rCrxr-)r��result�tok_type�	tok_value�	fieldchar�fieldnum�limits&      rr1r1�s���
�F�/��8����w���M�M�)�+�+�C��6�7�
��
 �"+��I�!�)�,�E���.� �#=�i�>R�=U�!V�W�W��M�M�)�y�';�<�=�%�(<�X�J�&G�H�H� 9��7�B�G�G�F�O�4�4rc� �V^8�dQhRRRR/#)rr�r.rz'list[tuple[str, str | tuple[str, int]]]r)rs"rrrs��B�B�c�B�&M�Brc�aaaa�.oRp.oR.o^.oVV3RlpVVV3RlpVPRR4F�pVf�VR8Xd+S^,'d	V!4MS'dV!4.pK8V\9dWS'dV!4VS^,8XdS^;;,^,
uu&KwS^,'dV!4VS^&^S^&K�S^,'dV!4SPV4K�VfK�VR8XdSPV4RpK�VPV4K�	S^,'d
V!4S#S'dV!4S#)aU
Tokenize date format patterns.

Returns a list of (token_type, token_value) tuples.

``token_type`` may be either "chars" or "field".

For "chars" tokens, the value is the literal value.

For "field" tokens, the value is a tuple of (field character, repetition count).

:param pattern: Pattern string
:type pattern: str
:rtype: list[tuple]
Nr�c�r<�SPRRPS4PRR434SRR#)r5r��r�:NNNN)r8r-r$)�charbufr9s��r�append_chars�&tokenize_pattern.<locals>.append_charss1����
�
�w����� 0� 8� 8��s� C�D�E��A�Jrc�b<�SPRS^,S^,334RS^&^S^&R#)r2r�N)r8)r<r=r9s���r�append_field�&tokenize_pattern.<locals>.append_fields3����
�
�w��1��x��{� ;�<�=��	�!�����r�''rBr�)r$r-r8�extend)	r��quotebufrDrGr�rCr<r=r9s	&    @@@@rr7r7s��� �F��H��G���I��s�H���
����d�+�����s�{��Q�<�<� �N�� �N�����&�� �N��9�Q�<�'��Q�K�1�$�K� ��|�|�$��#'�I�a�L�"#�H�Q�K��Q�<�<� �N����t�$�
�
!��s�{����x�(�������%�9,�<��|�|����M�
����Mrc� �V^8�dQhRRRR/#)r�tokensz+Iterable[tuple[str, str | tuple[str, int]]]rr.r)rs"rrrEs����J��s�rc��.pVF�wr#VR8Xd)VPV^,V^,,4K4VR8XgK=\;QJdRV4F'gKRM	RM
!RV44'gVPV4K�VPRVPRR4,4K�	R	PV4#)
z�
Turn a date format pattern token stream back into a string.

This is the reverse operation of ``tokenize_pattern``.

:type tokens: Iterable[tuple]
:rtype: str
r2r5c3�2"�TF
q\9x�K	R#5ir)r-)r�chs& rr�%untokenize_pattern.<locals>.<genexpr>Ss���?�Y�r�]�*�Y�s�TFz'%s'r�rIr�)r8�anyr$r-)rM�outputr:r;s&   r�untokenize_patternrTEs����F�%����w���M�M�)�A�,��1��5�6�
��
 ��3�?�Y�?�3�3�3�?�Y�?�?�?��
�
�i�(��
�
�f�y�'8�'8��d�'C�C�D� &��7�7�6�?�rc� �V^8�dQhRRRR/#)rr�r.rz	list[str]r)rs"rrrZs��#<�#<�C�#<�I�#<rc�R�\4p..p\V4Flwr4VR8XdHV^,V9d"VP.4VP4VP	V^,4VR,PW434Kn	VUu.uFp\V4NK	up#uupi)u�
Split an interval-describing datetime pattern into multiple pieces.

> The pattern is then designed to be broken up into two pieces by determining the first repeating field.
- https://www.unicode.org/reports/tr35/tr35-dates.html#intervalFormats

>>> split_interval_pattern(u'E d.M. – E d.M.')
[u'E d.M. – ', 'E d.M.']
>>> split_interval_pattern("Y 'text' Y 'more text'")
["Y 'text '", "Y 'more text'"]
>>> split_interval_pattern(u"E, MMM d – E")
[u'E, MMM d – ', u'E']
>>> split_interval_pattern("MMM d")
['MMM d']
>>> split_interval_pattern("y G")
['y G']
>>> split_interval_pattern(u"MMM d – d")
[u'MMM d – ', u'd']

:param pattern: Interval pattern string
:return: list of "subpatterns"
r2���)�setr7r8�clear�addrT)r��seen_fields�partsr:r;rMs&     r�split_interval_patternr]Zs���0�%�K�
�D�E�/��8����w����|�{�*����R� ��!�!�#��O�O�I�a�L�)�
�b�	���(�.�/�
 9�6;�;�U�6��v�&�U�;�;��;s�
B$c�(�V^8�dQhRRRRRRRR/#)	rr�r.�optionsz
Iterable[str]�allow_different_fieldsr�rr
r)rs"rrr�s0��O�O�S�O�=�O�RV�O�cm�Orc��\RV44pRV9dM\;QJdRV4F'gKRM	RM
!RV44'gVPRR4pRV9dM\;QJdRV4F'gKRM	RM
!RV44'gVPRR	4pR
V9dM\;QJdRV4F'gKRM	RM
!RV44'gVPR
R4pR
V9dM\;QJdRV4F'gKRM	RM
!RV44'gVPR
R4pRV9dM\;QJdRV4F'gKRM	RM
!RV44'gVPRR4p\R\	V444P
pRpRpVF�p\R\	V444P
p^p\F�p	V!V	^4p
V!V	^4pW�8XdKV^8XgV
^8XdV'gRpMUVR,
pKBV	R8Xd(V
^8�dV^8:gV
^8:dV^8�dVR,
pKpV\W�,
4,
pK�	V'gK�V'dW�8dTpTpV^8XgK�V#	V#)a
Find the closest match for the given datetime skeleton among the options given.

This uses the rules outlined in the TR35 document.

>>> match_skeleton('yMMd', ('yMd', 'yMMMd'))
'yMd'

>>> match_skeleton('yMMd', ('jyMMd',), allow_different_fields=True)
'jyMMd'

>>> match_skeleton('yMMd', ('qyMMd',), allow_different_fields=False)

>>> match_skeleton('hmz', ('hmv',))
'hmv'

:param skeleton: The skeleton to match
:type skeleton: str
:param options: An iterable of other skeletons to match against
:type options: Iterable[str]
:param allow_different_fields: Whether to allow a match that uses different fields
                               than the skeleton requested.
:type allow_different_fields: bool

:return: The closest skeleton match, or if no match was found, None.
:rtype: str|None
c3�8"�TFq'gKVx�K	R#5irr�r�options& rr�!match_skeleton.<locals>.<genexpr>�s���<�'��V�V�V�'�s�	�
r�c3�,"�TF
pRV9x�K	R#5i)r�Nrrcs& rrre�����"G�w�V�3�&�=�w���TFr�r|c3�,"�TF
pRV9x�K	R#5i)r|Nrrcs& rrre�rgrhr~r�c3�,"�TF
pRV9x�K	R#5i)r�Nrrcs& rrre�rgrhr{r�c3�,"�TF
pRV9x�K	R#5i)r�Nrrcs& rrre�rgrhr�r�c3�,"�TF
pRV9x�K	R#5i)r�Nrrcs& rrre�rgrhc3�R"�TFq^,R8XgKV^,x�K	R#5i�r�r2Nr�r�ts& rrre�s#��� ]�/I�!�q�T�U\�_���1���/I���'�'Nc3�R"�TFq^,R8XgKV^,x�K	R#5irnrros& rrre�s#���"]�1I�A�q�T�U\�_�4�1�Q�4�4�1I�rqir]�)rhrRr$�dictr7r�r-r)r�r_r`�get_input_field_width�
best_skeleton�
best_distancerd�get_opt_field_width�distancer2�input_width�	opt_widths&&&         rr�r��sE��F�<�'�<�<�G�
�h��s�s�"G�w�"G�s�s�s�"G�w�"G�G�G��#�#�C��-��
�h��s�s�"G�w�"G�s�s�s�"G�w�"G�G�G��#�#�C��-��
�h��s�s�"G�w�"G�s�s�s�"G�w�"G�G�G��#�#�C��-��
�h��s�s�"G�w�"G�s�s�s�"G�w�"G�G�G��#�#�C��,��
�h��s�s�"G�w�"G�s�s�s�"G�w�"G�G�G��#�#�C��,�� � ]�/?��/I� ]�]�a�a���M��M���"�"]�1A�&�1I�"]�]�a�a����"�E�/��q�9�K�+�E�1�5�I��'���A�~���!1�-�!�F���F�"���#��K�!�O�	�Q��K�[\�L\�aj�mn�an��E�!���C�� 7�8�8��#����� 8�"�M�$�M��q�=����9�8�rr�)rr�r)r�r�N)r�rN)r�N)r�N)Nr�NF)NNF)Nr�FNNF)Nr�N)Nr�NN)NNTN))rui�3�)rvi�')r�i�:	)rwr�)r>r�)r?�<)r@r�)r@g333333�?Fr�N)NNN)Nr�)r�rr�rr)r�rr�)r�rr�rr�)r�r�rrr})r�rr�r)F)W�__conditional_annotations__�__doc__�
__future__rr�r_r��	functoolsr�typingrrrrP�ModuleNotFoundErrorrSr*�collections.abcr�babelr�
babel.corer	r
r�babel.localedatar�typing_extensionsr
rBr2r?r�__annotations__rrr"r.r0rr�rQ�utcr1r,rr&r5r;r3rHrMr/rdrhrlrprur}r�r�r�r�r�r�r�r�r�r�r	r%r3rKr�rMrxr�rxr*r-r+r�r1r7rTr]r�)r~s@r�<module>r�s�����"#��	���6�6���
�$��9�9�+��+�"�-�-�(�-�-�7�%�?�$�F�H�i�F�'.�/P�'Q��9�Q�!�"9�:�H�i�:�%�.�.����@�3�F��L�x�}�}�\�_c�c�K��c�-��������
�
�
��
��
#���"�4?�(�V�<�>;�@G�"@�.B�*D�*7�"@�&�(@�&9,�xM�`w>�t#'�L'=�TGN�T/=�d0��,��v�r�:fK�RI�X	��	�J+�Z>/�BG�G�6J�J�Z
.���.���.��D�.��t�.���.���.���	.���	.�
�!�Q��.�
�q�c�.��!�Q��
.��i�
.�"%�q�c�
.�,/��
.��	�.�!�"4�.�7:�?�.���.���.�14�_�.��!�Q��.��q�!�f�.�"�A�q�6�.�,/��A��.��!�Q��.��!�Q��.��d�.� ��.���.��O�.�.1�1�a�&�.�;>��1�v�.���.��O�.�.1�/�.�
�*��&@��*�4�4��5��5�"B�J�*#<�LO�O��I;���D���s�K9�9
L
�	L


Youez - 2016 - github.com/yon3zu
LinuXploit