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੐)|#o0aڱ$I>}k&1`U#V?YsV x>{t1[I~D&(I$I/{H0fw"q"y%4 IXyE~M3 8XψL}qE$I[> nD?~sf ]o΁ cT6"?'_Ἣ $I>~.f|'!N?⟩0G KkXZE]ޡ;/&?k OۘH$IRۀwXӨ<7@PnS04aӶp.:@\IWQJ6sS%I$e5ڑv`3:x';wq_vpgHyXZ 3gЂ7{{EuԹn±}$I$8t;b|591nءQ"P6O5i }iR̈́%Q̄p!I䮢]O{H$IRϻ9s֧ a=`- aB\X0"+5"C1Hb?߮3x3&gşggl_hZ^,`5?ߎvĸ%̀M!OZC2#0x LJ0 Gw$I$I}<{Eb+y;iI,`ܚF:5ܛA8-O-|8K7s|#Z8a&><a&/VtbtLʌI$I$I$I$I$I$IRjDD%tEXtdate:create2022-05-31T04:40:26+00:00!Î%tEXtdate:modify2022-05-31T04:40:26+00:00|{2IENDB`Mini Shell

HOME


Mini Shell 1.0
DIR:/snap/core24/current/lib/python3.12/__pycache__/
Upload File :
Current File : //snap/core24/current/lib/python3.12/__pycache__/calendar.cpython-312.pyc
�

�(�gJc��t�dZddlZddlZddlmZmZddlZddlm	Z	ddl
Z
gd�ZeZ
Gd�de�ZGd�d	e�Zd
�ZeGd�de��ZeGd
�de��Zgd�ZGd�d�ZGd�d�Zed�Zed�Zed�Zed�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z Gd�d e!�Z"Gd!�d"e"�Z#Gd#�d$e"�Z$Gd%�d&�Z%d'�Z&Gd(�d)e#�Z'Gd*�d+e$�Z(e#�Z)e)jTZ+d,�Z,e)jZZ.e)j^Z/e)j`Z1e)jdZ3e)jhZ4e)jjZ6e)jnZ8e)jrZ:d-Z;d.Z<e;e<fd/�Z=e;e<fd0�Z>d1Z?ej�e?d2d2�j��ZBd3�ZCd4�ZDeEd5k(reDej��yy)6a$Calendar printing functions

Note when comparing these calendars to the ones printed by cal(1): By
default, these calendars have Monday as the first day of the week, and
Sunday as the last (the European convention). Use setfirstweekday() to
set the first day of the week (0=Monday, 6=Sunday).�N)�IntEnum�global_enum)�repeat)-�IllegalMonthError�IllegalWeekdayError�setfirstweekday�firstweekday�isleap�leapdays�weekday�
monthrange�
monthcalendar�prmonth�month�prcal�calendar�timegm�
month_name�
month_abbr�day_name�day_abbr�Calendar�TextCalendar�HTMLCalendar�LocaleTextCalendar�LocaleHTMLCalendar�
weekheader�Day�Month�JANUARY�FEBRUARY�MARCH�APRIL�MAY�JUNE�JULY�AUGUST�	SEPTEMBER�OCTOBER�NOVEMBER�DECEMBER�MONDAY�TUESDAY�	WEDNESDAY�THURSDAY�FRIDAY�SATURDAY�SUNDAYc��eZdZd�Zd�Zy)rc��||_y�N�r)�selfrs  �/usr/lib/python3.12/calendar.py�__init__zIllegalMonthError.__init__ s	����
�c� �d|jzS)Nz!bad month number %r; must be 1-12r6�r7s r8�__str__zIllegalMonthError.__str__"s��2�T�Z�Z�?�?r:N��__name__�
__module__�__qualname__r9r=�r:r8rrs
���@r:rc��eZdZd�Zd�Zy)rc��||_yr5�r)r7rs  r8r9zIllegalWeekdayError.__init__'s	����r:c� �d|jzS)Nz7bad weekday number %r; must be 0 (Monday) to 6 (Sunday)rEr<s r8r=zIllegalWeekdayError.__str__)s��H�4�<�<�W�Wr:Nr>rBr:r8rr&s
���Xr:rc��|dvr8tjd|�d|j��d�td��|dk(ryyt	d	t
�d
|�d���)N)�January�FebruaryzThe 'z ' attribute is deprecated, use 'z	' instead�)�
stacklevelrH�zmodule 'z' has no attribute '�')�warnings�warn�upper�DeprecationWarning�AttributeErrorr?)�names r8�__getattr__rT-s^���&�&��
�
��d�V�#C�D�J�J�L�>�QZ�[�(�Q�	8��9����
�8�H�:�-A�$��q�I�
J�Jr:c�<�eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZy
)rrLrJ�������	�
��N)r?r@rAr r!r"r#r$r%r&r'r(r)r*r+rBr:r8rr:s>���G��H�
�E�
�E�
�C��D��D�
�F��I��G��H��Hr:rc�(�eZdZdZdZdZdZdZdZdZ	y)	rrrLrJrVrWrXrYN)
r?r@rAr,r-r.r/r0r1r2rBr:r8rrKs%��
�F��G��I��H�
�F��H�
�Fr:r)
r��ra�rarcrararcrarcrac
���eZdZed�D���cgc]&}t	j
d|dzd�j��(c}}}Zejdd��d�Z	d�Z
d�Zy	cc}}}w)
�_localized_monthr_��rLrc��y)N�rB)�xs r8�<lambda>z_localized_month.<lambda>as�r:c��||_yr5��format�r7rms  r8r9z_localized_month.__init__c�	����r:c��|j|}t|t�r |D�cgc]}||j���c}S||j�Scc}wr5)�_months�
isinstance�slicerm�r7�i�funcs�fs    r8�__getitem__z_localized_month.__getitem__fsF�����Q����a���,1�2�q�A�d�k�k�N�2�2�����%�%��3��Ac��y)N�
rBr<s r8�__len__z_localized_month.__len__ms��r:N)r?r@rA�range�datetime�date�strftimerq�insertr9rxr|��.0rur~s000r8rere^sS��=B�2�Y�G�G��x�}�}�T�1�Q�3��*�3�3�G�G��N�N�1�l�#��&���Hs�+Arec��eZdZed�D���cgc]&}t	j
dd|dz�j��(c}}}Zd�Zd�Z	d�Z
ycc}}}w)�_localized_dayrZrfrLc��||_yr5rlrns  r8r9z_localized_day.__init__vror:c��|j|}t|t�r |D�cgc]}||j���c}S||j�Scc}wr5)�_daysrrrsrmrts    r8rxz_localized_day.__getitem__ysF���
�
�1�
���a���,1�2�q�A�d�k�k�N�2�2�����%�%��3ryc��y�NrZrBr<s r8r|z_localized_day.__len__�s��r:N)r?r@rAr}r~rr�r�r9rxr|r�s000r8r�r�qsH��<A��8�D�D�a�X�]�]�4��A�a�C�
(�
1�
1�D�E��&���
Es�+Ar�z%Az%az%Bz%bc�:�|dzdk(xr|dzdk7xs|dzdk(S)z5Return True for leap years, False for non-leap years.rWr�d�rB)�years r8r
r
�s*���!�8�q�=�A�d�S�j�A�o�@����q��Ar:c�\�|dz}|dz}|dz|dzz
|dz|dzz
z
|dz|dzz
zS)zFReturn number of leap years in range [y1, y2).
       Assume y1 <= y2.rLrWr�r�rB)�y1�y2s  r8rr�sL���!�G�B��!�G�B���E�B��E�M�b�#�g��C��/�0�B��G�b�#�g�4E�F�Fr:c��tj|cxkrtjks
nd|dzz}ttj|||�j��S)zBReturn weekday (0-6 ~ Mon-Sun) for year, month (1-12), day (1-31).i�r�)r~�MINYEAR�MAXYEARrrr)r�r�days   r8rr�sJ�����t�7�x�'7�'7�7��d�S�j� ���x�}�}�T�5�#�.�6�6�8�9�9r:c��d|cxkrdkst|��t|��t||d�}t||tk(xrt	|�z}||fS)zQReturn weekday (0-6 ~ Mon-Sun) and number of days (28-31) for
       year, month.rLr_)rr�mdaysr!r
)r�r�day1�ndayss    r8r
r
�s`��
�������&�&����&�&��4���"�D��%�L�E�X�-�>�&��,�?�E���;�r:c�B�t||tk(xrt|�zSr5)r�r!r
�r�rs  r8�	_monthlenr��s����<�5�H�,�=����>�>r:c�(�|dk(r|dz
dfS||dz
fS)NrLr_rBr�s  r8�
_prevmonthr��s%����z��A�v�r�z���U�1�W�}�r:c�(�|dk(r|dzdfS||dzfS)Nr_rLrBr�s  r8�
_nextmonthr��s%����{��A�v�q�y���U�1�W�}�r:c��eZdZdZdd�Zd�Zd�Zeee�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zdd�Zdd�Zdd�Zy)rzo
    Base calendar class. This class doesn't do any formatting. It simply
    provides data to subclasses.
    c��||_yr5�r	�r7r	s  r8r9zCalendar.__init__�s
��(��r:c� �|jdzSr���
_firstweekdayr<s r8�getfirstweekdayzCalendar.getfirstweekday�s���!�!�A�%�%r:c��||_yr5r�r�s  r8rzCalendar.setfirstweekday�s
��)��r:c#�jK�t|j|jdz�D]	}|dz���y�w)zt
        Return an iterator for one week of weekday numbers starting with the
        configured first one.
        rZN)r}r	)r7rus  r8�iterweekdayszCalendar.iterweekdays�s8����
�t�(�(�$�*;�*;�a�*?�@�	�A��A�#�I�	�s�13c#�tK�|j||�D]\}}}tj|||����!y�w)z�
        Return an iterator for one month. The iterator will yield datetime.date
        values and will always iterate through complete weeks, so it will yield
        dates outside the specified month.
        N)�itermonthdays3r~r)r7r�r�y�m�ds      r8�itermonthdateszCalendar.itermonthdates�s=�����*�*�4��7�	)�G�A�q�!��-�-��1�a�(�(�	)�s�68c#�K�t||�\}}||jz
dz}td|�Ed{���td|dz�Ed{���|j|z
|z
dz}td|�Ed{���y7�E7�07�	�w)z�
        Like itermonthdates(), but will yield day numbers. For days outside
        the specified month the day number is 0.
        rZrNrL)r
r	rr})r7r�rr�r��days_before�
days_afters       r8�
itermonthdayszCalendar.itermonthdays�s�����
!��u�-���e��d�/�/�/�1�4���!�[�)�)�)���E�A�I�&�&�&��'�'�$�.��6�!�;�
��!�Z�(�(�(�	*��&��(�s3�1A?�A9�A?�
A;�(A?�3A=�4A?�;A?�=A?c#�zK�t|j||�|j�D]\}}||dzf���y�w)z�
        Like itermonthdates(), but will yield (day number, weekday number)
        tuples. For days outside the specified month the day number is 0.
        rZN)�	enumerater�r	)r7r�rrur�s     r8�itermonthdays2zCalendar.itermonthdays2�sB����
�d�0�0��u�=�t�?P�?P�Q�	�D�A�q��Q��U�(�N�	�s�9;c#�tK�t||�\}}||jz
dz}|j|z
|z
dz}t||�\}}t||�dz}	t	|	|z
|	�D]	}
|||
f���t	d|dz�D]	}
|||
f���t||�\}}t	d|dz�D]	}
|||
f���y�w)z�
        Like itermonthdates(), but will yield (year, month, day) tuples.  Can be
        used for dates outside of datetime.date range.
        rZrLN)r
r	r�r�r}r�)r7r�rr�r�r�r�r�r��endr�s           r8r�zCalendar.itermonthdays3�s�����
!��u�-���e��d�/�/�/�1�4���'�'�$�.��6�!�;�
��$��&���1���1�o��!���s�;���,�	�A��Q��'�M�	��q�%�!�)�$�	!�A���q�.� �	!��$��&���1��q�*�q�.�)�	�A��Q��'�M�	�s�B6B8c#�K�t|j||��D]!\}\}}}||||j|zdzf���#y�w)z�
        Like itermonthdates(), but will yield (year, month, day, day_of_week) tuples.
        Can be used for dates outside of datetime.date range.
        rZN)r�r�r	)r7r�rrur�r�r�s       r8�itermonthdays4zCalendar.itermonthdays4sR����
&�d�&9�&9�$��&F�G�	7�L�A�y��1�a��Q��D�-�-��1�Q�6�6�6�	7�s�AAc��t|j||��}tdt|�d�D�cgc]
}|||dz��c}Scc}w)z�
        Return a matrix (list of lists) representing a month's calendar.
        Each row represents a week; week entries are datetime.date values.
        rrZ)�listr�r}�len)r7r�r�datesrus     r8�monthdatescalendarzCalendar.monthdatescalendar
sF��
�T�(�(��u�5�6��',�Q��E�
�A�'>�@�!��q��1���@�@��@��Ac��t|j||��}tdt|�d�D�cgc]
}|||dz��c}Scc}w)z�
        Return a matrix representing a month's calendar.
        Each row represents a week; week entries are
        (day number, weekday number) tuples. Day numbers outside this month
        are zero.
        rrZ)r�r�r}r��r7r�r�daysrus     r8�monthdays2calendarzCalendar.monthdays2calendarsF���D�'�'��e�4�5��&+�A�s�4�y�!�&<�>���a��!���>�>��>r�c��t|j||��}tdt|�d�D�cgc]
}|||dz��c}Scc}w)z�
        Return a matrix representing a month's calendar.
        Each row represents a week; days outside this month are zero.
        rrZ)r�r�r}r�r�s     r8�monthdayscalendarzCalendar.monthdayscalendarsF��
�D�&�&�t�U�3�4��&+�A�s�4�y�!�&<�>���a��!���>�>��>r�c��tD�cgc]}|j||���}}tdt|�|�D�cgc]
}||||z��c}Scc}wcc}w)a'
        Return the data for the specified year ready for formatting. The return
        value is a list of month rows. Each month row contains up to width months.
        Each month contains between 4 and 6 weeks and each week contains 1-7
        days. Days are datetime.date objects.
        r)rr�r}r��r7r��widthr��monthsrus      r8�yeardatescalendarzCalendar.yeardatescalendar'�W��=B�B�q�$�)�)�$��2�B��B�+0��C��K��+G�I�a��q��5��!�I�I��C��I�
�A�Ac��tD�cgc]}|j||���}}tdt|�|�D�cgc]
}||||z��c}Scc}wcc}w)z�
        Return the data for the specified year ready for formatting (similar to
        yeardatescalendar()). Entries in the week lists are
        (day number, weekday number) tuples. Day numbers outside this month are
        zero.
        r)rr�r}r�r�s      r8�yeardays2calendarzCalendar.yeardays2calendar1r�r�c��tD�cgc]}|j||���}}tdt|�|�D�cgc]
}||||z��c}Scc}wcc}w)z�
        Return the data for the specified year ready for formatting (similar to
        yeardatescalendar()). Entries in the week lists are day numbers.
        Day numbers outside this month are zero.
        r)rr�r}r�r�s      r8�yeardayscalendarzCalendar.yeardayscalendar;sW��<A�A�a�$�(�(��q�1�A��A�+0��C��K��+G�I�a��q��5��!�I�I��B��Ir�N)r�rV)r?r@rA�__doc__r9r�r�propertyr	r�r�r�r�r�r�r�r�r�r�r�r�rBr:r8rr�sd���
)�&�*��O�_�=�L��)�
)���$7�A�?�?�J�J�Jr:rc�V�eZdZdZd�Zd�Zd�Zd�Zd�Zd
d�Z	dd�Z
dd	�Zdd
�Zdd�Z
y)rzr
    Subclass of Calendar that outputs a calendar as a simple plain text
    similar to the UNIX program cal.
    c�>�t|j||�d��y)z3
        Print a single week (no newline).
        rh�r�N)�print�
formatweek�r7�theweekr�s   r8�prweekzTextCalendar.prweekKs��	�d�o�o�g�u�-�2�6r:c�>�|dk(rd}nd|z}|j|�S)z*
        Returns a formatted day.
        rrhz%2i��center)r7r�rr��ss     r8�	formatdayzTextCalendar.formatdayQs'���!�8��A����A��x�x���r:c�<���dj��fd�|D��S)zA
        Returns a single week in a string (no newline).
        � c3�J�K�|]\}}�j||�����y�wr5�r�)r�r��wdr7r�s   ��r8�	<genexpr>z*TextCalendar.formatweek.<locals>.<genexpr>_s"�����L��!�R����q�"�e�4�L�s� #��joinr�s` `r8r�zTextCalendar.formatweek[s����x�x�L�G�L�L�Lr:c�T�|dk\rt}nt}||d|j|�S)z4
        Returns a formatted week day name.
        r\N)rrr�)r7r�r��namess    r8�
formatweekdayzTextCalendar.formatweekdayas1���A�:��E��E��S�z�&�5�!�(�(��/�/r:c�X���dj��fd��j�D��S)z-
        Return a header for a week.
        r�c3�B�K�|]}�j|�����y�wr5�r�)r�rur7r�s  ��r8r�z0TextCalendar.formatweekheader.<locals>.<genexpr>os�����R���*�*�1�e�4�R�s��r�r�)r7r�s``r8�formatweekheaderzTextCalendar.formatweekheaderks#����x�x�R�d�>O�>O�>Q�R�R�Rr:c�H�t|}|r|�d|��}|j|�S)z0
        Return a formatted month name.
        r�)rr�)r7�theyear�themonthr��withyearr�s      r8�formatmonthnamezTextCalendar.formatmonthnameqs)��
�x� ����g�&�A��x�x���r:c�B�t|j||||�d��y)z+
        Print a month's calendar.
        rhr�N)r��formatmonth)r7r�r��w�ls     r8rzTextCalendar.prmonthzs��	�d���w��!�Q�7�R�@r:c�v�td|�}td|�}|j||d|dzzdz
�}|j�}|d|zz
}||j|�j�z
}|d|zz
}|j	||�D]-}||j||�j�z
}|d|zz
}�/|S)z@
        Return a month's calendar string (multi-line).
        rJrLrZ�
)�maxr��rstripr�r�r�)r7r�r�r�r�r��weeks       r8r�zTextCalendar.formatmonth�s���
��1�I����1�I��� � ��(�A��Q��K�!�O�D��
�H�H�J��	�T�A�X�
��	�T�
"�
"�1�
%�
,�
,�
.�.��	�T�A�X�
���+�+�G�X�>�	�D�
�����q�)�0�0�2�2�A�
����M�A�	��r:c	������td|�}td|�}td|�}|dzdzdz
�g}|j}|t��j�|z||dz
zz�j	��|d|z��j|��t
�j�|��D�]A\}}	t||zdzt||dzzdzd��}
|d|z����fd�|
D�}|t|�|�j	��|d|z��fd�|
D�}|t|�|�j	��|d|z�td�|	D��}
t|
�D]{}g}|	D]F}|t|�k\r|jd	��#|j�j|||���H|t|�|�j	��|d|z��}��Dd	j|�S)
zC
        Returns a year's calendar as a multi-line string.
        rJrLrZr�r{c3�F�K�|]}�j�|�d����y�w)FN)r�)r��k�colwidthr7r�s  ���r8r�z*TextCalendar.formatyear.<locals>.<genexpr>�s*�����&���)�)�'�1�h��F�&�s�!c3�"�K�|]}����y�wr5rB)r�r�headers  �r8r�z*TextCalendar.formatyear.<locals>.<genexpr>�s�����.�!�v�.�s�c3�2K�|]}t|����y�wr5)r�)r��cals  r8r�z*TextCalendar.formatyear.<locals>.<genexpr>�s����1�c��S��1�s�rh)r��append�reprr�rr�r�r�r}�min�formatstringr�r�r�)r7r�r�r��cr��v�aru�rowr�r��headers�height�j�weeksr	rrs``               @@r8�
formatyearzTextCalendar.formatyear�s����
��1�I����1�I����1�I����E�Q�;��?����
�H�H��	�$�w�-�
�
�x��z�!�Q�q�S�'�1�
2�
9�
9�
;�<�	�$�q�&�	��&�&�q�)��!�$�"8�"8��!�"D�E�	�H�Q���1�Q�3�q�5�#�a��1��g�a�i��"4�5�F�
�d�1�f�I�&�$�&�E�
�l�5�(�A�.�5�5�7�8�
�d�1�f�I�.�v�.�G�
�l�7�H�a�0�7�7�9�:�
�d�1�f�I��1�S�1�1�F��6�]�
�����A�C��C��H�}����R�(����T�_�_�S��V�Q�%?�@�	A�
�,�u�h��2�9�9�;�<��$��(��
�	�,�w�w�q�z�r:c	�D�t|j|||||�d��y)zPrint a year's calendar.rhr�N)r�r)r7r�r�r�rr�s      r8�pryearzTextCalendar.pryear�s��
�d�o�o�g�q�!�Q��2��;r:N�T)rr)rJrLrYrV)rrrYrV)r?r@rAr�r�r�r�r�r�r�rr�rrrBr:r8rrEs=���
7��M�0�S��A�� #�J<r:rc�h�eZdZdZgd�ZeZdZdZdZdZ	dZ
d�Zd�Zd�Z
d	�Zdd
�Zdd�Zdd�Zdd�Zy
)rz4
    This calendar returns complete HTML pages.
    )�mon�tue�wed�thu�fri�sat�sun�nodayrr�c�R�|dk(rd|jzSd|j||fzS)z/
        Return a day as a table cell.
        rz<td class="%s">&nbsp;</td>z<td class="%s">%d</td>)�cssclass_noday�
cssclasses)r7r�rs   r8r�zHTMLCalendar.formatday�s5���!�8�/�$�2E�2E�E�E�+�t���w�/G��.M�M�Mr:c�B��dj�fd�|D��}d|zS)z8
        Return a complete week as a table row.
        rhc3�H�K�|]\}}�j||����y�wr5r�)r�r�r�r7s   �r8r�z*HTMLCalendar.formatweek.<locals>.<genexpr>�s �����A�g�q�"�D�N�N�1�b�)�A�s�"�<tr>%s</tr>r�)r7r�r�s`  r8r�zHTMLCalendar.formatweek�s$���
�G�G�A��A�A���q� � r:c�<�d|j|�dt|�d�S)z:
        Return a weekday name as a table header.
        z<th class="�">z</th>)�cssclasses_weekday_headr)r7r�s  r8r�zHTMLCalendar.formatweekday�s"��

�(�(��-�x��}�>�	>r:c�^��dj�fd��j�D��}d|zS)z<
        Return a header for a week as a table row.
        rhc3�@�K�|]}�j|����y�wr5r�)r�rur7s  �r8r�z0HTMLCalendar.formatweekheader.<locals>.<genexpr>�s�����G�a�D�&�&�q�)�G���r(r�)r7r�s` r8r�zHTMLCalendar.formatweekheader�s-���
�G�G�G�4�3D�3D�3F�G�G���q� � r:c�b�|rt|�d|��}ndt|z}d|j�d|�d�S)z5
        Return a month name as a table row.
        r�z%sz<tr><th colspan="7" class="r*z
</th></tr>)r�cssclass_month_head)r7r�r�r�r�s     r8r�zHTMLCalendar.formatmonthname�s;���%�h�/��9�A��z�(�+�+�A���$�$�a�)�	)r:c��g}|j}|d|jz�|d�||j|||���|d�||j��|d�|j	||�D]!}||j|��|d��#|d�|d�dj
|�S)z6
        Return a formatted month as a table.
        �=<table border="0" cellpadding="0" cellspacing="0" class="%s">r��r��</table>rh)r
�cssclass_monthr�r�r�r�r�)r7r�r�r�rrrs       r8r�zHTMLCalendar.formatmonth�s���
��
�H�H��	�
I����!�	"�	�$��	�$�
�
�w��8�
�
D�E�	�$��	�$�
�
�
!�"�	�$���+�+�G�X�>�	�D�
�d�o�o�d�#�$�
�d�G�	�	
�*�
�	�$���w�w�q�z�r:c	��g}|j}t|d�}|d|jz�|d�|d||j|fz�t	t
t
dz|�D]\}t	|t
||zd��}|d�|D],}|d�||j||d	�
��|d��.|d��^|d
�dj|�S)z?
        Return a formatted year as a table of tables.
        rLr2r�z,<tr><th colspan="%d" class="%s">%s</th></tr>r_r{z<tr>z<td>Fr3z</td>z</tr>r4rh)	r
r��
cssclass_year�cssclass_year_headr}r rr�r�)r7r�r�rrrur�r�s        r8rzHTMLCalendar.formatyears���
��
�H�H���E�1�
��	�
I�
�
�
��	�	�$��	�
8��4�*�*�G�<5�5�	6��w���
�E�2�	�A��1�c�!�E�'�2�.�/�F�
�f�I��
���&�	��$�"�"�7�A��"�>�?��'�
�
�
�g�J�	�	
�*�
��w�w�q�z�r:Nc��|�tj�}g}|j}|d|z�|d�|d�|d�|d|z�|�|d|z�|d|z�|d�|d	�||j||��|d
�|d�dj	|�j|d
�S)zB
        Return a formatted year as a complete HTML page.
        z$<?xml version="1.0" encoding="%s"?>
zn<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
z<html>
z<head>
zC<meta http-equiv="Content-Type" content="text/html; charset=%s" />
z4<link rel="stylesheet" type="text/css" href="%s" />
z<title>Calendar for %d</title>
z</head>
z<body>
z</body>
z</html>
rh�xmlcharrefreplace)�sys�getdefaultencodingr
rr��encode)r7r�r��css�encodingrrs       r8�formatyearpagezHTMLCalendar.formatyearpage*s������-�-�/�H���
�H�H��	�
1�H�
<�=�	�
{�|�	�*�
�	�*�
�	�
P�S[�
[�\��?�
�E��K�L�	�
,�w�
6�7�	�+��	�*�
�	�$�/�/�'�5�
)�*�	�+��	�+���w�w�q�z� � ��+>�?�?r:rr�)rV�calendar.cssN)r?r@rAr�r%r+r$r0r5r8r7r�r�r�r�r�r�rr@rBr:r8rr�sf���
C�J�)���N�"���N� ���M�N�!�>�!�	)��(�0@r:rc��eZdZd�Zd�Zd�Zy)�different_localec� �||_d|_yr5)�locale�	oldlocale)r7rEs  r8r9zdifferent_locale.__init__Cs�������r:c��tjtjd�|_tjtj|j�yr5)�_locale�	setlocale�LC_TIMErFrEr<s r8�	__enter__zdifferent_locale.__enter__Gs2�� �*�*�7�?�?�D�A������'�/�/�4�;�;�7r:c�z�|j�ytjtj|j�yr5)rFrHrIrJ)r7�argss  r8�__exit__zdifferent_locale.__exit__Ks'���>�>�!�����'�/�/�4�>�>�:r:N)r?r@rAr9rKrNrBr:r8rCrCBs���8�;r:rCc���tjtjd�}|dk(r:td�5tjtjd�}ddd�|S|S#1swY|SxYw)N�Crh)rHrIrJrC�rEs r8�_get_default_localerRQsa��
�
�
�w����
5�F�
��}�
�b�
!�	>��&�&�w����=�F�	>��M�6�M�		>��M�s�%A&�&A0c�6��eZdZdZdd�Z�fd�Zd�fd�	Z�xZS)r��
    This class can be passed a locale name in the constructor and will return
    month and weekday names in the specified locale.
    c�V�tj||�|�
t�}||_yr5)rr9rRrE�r7r	rEs   r8r9zLocaleTextCalendar.__init__a�&�����d�L�1��>�(�*�F���r:c�z��t|j�5t�|�
||�cddd�S#1swYyxYwr5�rCrE�superr�)r7r�r��	__class__s   �r8r�z LocaleTextCalendar.formatweekdaygs3���
�d�k�k�
*�	5��7�(��e�4�	5�	5�	5�s�1�:c�~��t|j�5t�|�
||||�cddd�S#1swYyxYwr5�rCrErZr�)r7r�r�r�r�r[s     �r8r�z"LocaleTextCalendar.formatmonthnameks;���
�d�k�k�
*�	O��7�*�7�H�e�X�N�	O�	O�	O�s�3�<�rNr�r?r@rAr�r9r�r��
__classcell__�r[s@r8rr[s����
�5�O�Or:rc�6��eZdZdZdd�Z�fd�Zd�fd�	Z�xZS)rrTc�V�tj||�|�
t�}||_yr5)rr9rRrErVs   r8r9zLocaleHTMLCalendar.__init__urWr:c�x��t|j�5t�|�
|�cddd�S#1swYyxYwr5rY)r7r�r[s  �r8r�z LocaleHTMLCalendar.formatweekday{s1���
�d�k�k�
*�	.��7�(��-�	.�	.�	.�s�0�9c�|��t|j�5t�|�
|||�cddd�S#1swYyxYwr5r])r7r�r�r�r[s    �r8r�z"LocaleHTMLCalendar.formatmonthnames9���
�d�k�k�
*�	H��7�*�7�H�h�G�	H�	H�	H�s�2�;r^rr_ras@r8rrps�����.�H�Hr:rc�n�t|cxkrtkst|��t|��|t_yr5)r,r2rrr	r�s r8rr�s1���\�+�V�+�!�,�/�/�,�!�,�/�/�!�A�Nr:�rYc�0�tt|||��y)z1Prints multi-column formatting for year calendarsN)r�r
��colsr�spacings   r8rmrm�s��	�,�t�X�w�
/�0r:c�B��|dz}|j�fd�|D��S)zEReturns a string formatted from n strings, centered within n columns.r�c3�@�K�|]}|j�����y�wr5r�)r�rrs  �r8r�zformatstring.<locals>.<genexpr>�s�����9�q�����*�9�r.r�ris ` r8r
r
�s!����s�N�G��<�<�9�D�9�9�9r:i�rLc��|dd\}}}}}}tj||d�j�tz
|zdz
}|dz|z}|dz|z}	|	dz|z}
|
S)zBUnrelated but handy function to calculate Unix timestamp from GMT.NrYrL��<)r~r�	toordinal�
_EPOCH_ORD)�tupler�rr��hour�minute�secondr��hours�minutes�secondss           r8rr�sr��-2�2�A�Y�*�D�%��d�F�F��=�=��u�a�(�2�2�4�z�A�C�G�!�K�D���G�d�N�E��B�h���G��b�j�6�!�G��Nr:c�n�ddl}|j�}|jd�}|jd�}|jddtdd��|jd	d
tdd��|jd
dtdd��|jddtdd��|jdddd��|jdddd��|jdddd��|jd d!d"d#d$�%�|jd&d'td(�)�|jd*d'td+�)�|j|dd�}|jr2|js&|jd,�tjd�|j|jf}|jd-k(�r#|jr
t|�.�}n
t�}|j}|�tj�}t||j �/�}	tj"j$j&}
|j(�@|
|j*t,j.j1�j(fi|	���y|j2�$|
|j*|j(fi|	���y|jd0�tjd�y|jr
t5|�.�}n
t7�}t|j8|j:�1�}	|j2�|j<|	d2<|j>|	d3<|j(�:|j@t,j.j1�j(fi|	��}nR|j2�|j@|j(fi|	��}n(|jB|j(|j2fi|	��}tj"j&}
|jr?|jE|j�}tj"j$j&}
|
|�y)4Nrztext only argumentszhtml only argumentsz-wz--widthrJz width of date column (default 2))�type�default�helpz-lz--linesrLz)number of lines for each week (default 1)z-sz	--spacingrYz"spacing between months (default 6)z-mz--monthsrVzmonths per row (default 3)z-cz--cssrAzCSS to use for page)r|r}z-Lz--localez)locale to use for month and weekday namesz-ez
--encodingzencoding to use for outputz-tz--type�text)r~�htmlzoutput type (text or html))r|�choicesr}r��?zyear number)�nargsr{r}rzmonth number (1-12, text only)z/if --locale is specified --encoding is requiredrrQ)r?r>zincorrect number of arguments)r�r�rr�)#�argparse�ArgumentParser�add_argument_group�add_argument�int�
parse_argsrEr?�errorr;�exitr{rrr<�dictr>�stdout�buffer�writer�r@r~r�todayrrrr��linesrkr�rr�r=)rMr��parser�	textgroup�	htmlgroup�optionsrEr	r?�optdictr��results            r8�mainr��s����
�
$�
$�
&�F��)�)�*?�@�I��)�)�*?�@�I�
����i�
�!�
/���
����i�
�!�
8���
����k�
�!�
1���
����j�
�!�
)���
����g��
"���
����j��
8���
����l��
)���
����h�� �
)�	��������
���
������
-�������Q�R��)�G��~�~�g�.�.����F�G������
�^�^�W�-�-�
-�F��|�|�v���>�>�$�F�3�C��.�C��#�#�����-�-�/�H���g�k�k�:���
�
�!�!�'�'���<�<���$�#�$�$�X�]�]�%8�%8�%:�%?�%?�K�7�K�L�
�]�]�
"��$�#�$�$�W�\�\�=�W�=�>��L�L�8�9��H�H�Q�K��>�>�$�F�3�C��.�C�����'�-�-�8���=�=� �"�?�?�G�C�L�"�>�>�G�C�L��<�<��#�S�^�^�H�M�M�$7�$7�$9�$>�$>�J�'�J�F�
�]�]�
"�#�S�^�^�G�L�L�<�G�<�F�$�S�_�_�W�\�\�7�=�=�L�G�L�F��
�
� � ������]�]�7�#3�#3�4�F��J�J�%�%�+�+�E�
�f�
r:�__main__)Gr�r;r~�enumrrrErH�	itertoolsrrN�__all__�
ValueErrorr�rrrTrrr�rer�rrrrr
rrr
r�r�r��objectrrrrCrRrrrr�r	rr�rr�r�rr�rrr�rrrrr�	_colwidth�_spacingrmr
�EPOCHrrqrrrr�r?�argvrBr:r8�<module>r�s!��7���%����
!��	��@�
�@�X�*�X�	K�
��G��
�� 
��'��
��	<����&��(�$����$����d�
#�
�
�d�
#�
�B�
G�:��?���EJ�v�EJ�Pr<�8�r<�jE@�8�E@�P;�;��O��O�*H��H�(�N��� � ��"�
�#�#�
�	
�����|�|��
�
�
�
�
�)�)��	�
�
���<�<��	����
�	���$�X�1�
!*�8�:�	
��
�X�]�]�5�!�Q�
'�
1�
1�
3�
��e�P�z������N�r: