Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
3 \­Zã@sdZddlZddlZddlZddlmZdddddd d d d d ddddddddddddddgZeZ Gdd„deƒZ Gdd„deƒZ dZ dZ dd d!d d"d d"d d d"d d"d g ZGd#d$„d$ƒZGd%d&„d&ƒZed'ƒZed(ƒZed)ƒZed*ƒZed+ƒ\ZZZZZZZd,d„Zd-d „Zd.d „Zd/d „Z Gd0d„de!ƒZ"Gd1d„de"ƒZ#Gd2d„de"ƒZ$Gd3d4„d4ƒZ%Gd5d„de#ƒZ&Gd6d„de$ƒZ'e#ƒZ(e(j)Z*d7d„Z+e(j,Z-e(j.Z.e(j/Z0e(j1Z2e(j3Z3e(j4Z5e(j6Z7e(j8Z9dDZ:d9Z;e:e;fd:d;„ZZ>ej?e>ddƒj@ƒZAd?d„ZBd@dA„ZCeDdBk�reCejEƒdS)Ea$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)Ú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Ú weekheaderc@seZdZdd„Zdd„ZdS)rcCs ||_dS)N)r )Úselfr ©rú /usr/lib64/python3.6/calendar.pyÚ__init__szIllegalMonthError.__init__cCs d|jS)Nz!bad month number %r; must be 1-12)r )rrrrÚ__str__szIllegalMonthError.__str__N)Ú__name__Ú __module__Ú __qualname__rrrrrrrsc@seZdZdd„Zdd„ZdS)rcCs ||_dS)N)r )rr rrrr szIllegalWeekdayError.__init__cCs d|jS)Nz7bad weekday number %r; must be 0 (Monday) to 6 (Sunday))r )rrrrr"szIllegalWeekdayError.__str__N)r r!r"rrrrrrrséééééc@sFeZdZdd„edƒDƒZejddd„ƒdd„Zd d „Zd d „Zd S)Ú_localized_monthcCs g|]}tjd|ddƒj‘qS)iÑr#)ÚdatetimeÚdateÚstrftime)Ú.0Úirrrú 4sz_localized_month.é rcCsdS)NÚr)ÚxrrrÚ5sz_localized_month.cCs ||_dS)N)Úformat)rr3rrrr7sz_localized_month.__init__cs4ˆj|}t|tƒr&‡fdd„|DƒS|ˆjƒSdS)Ncsg|]}|ˆjƒ‘qSr)r3)r,Úf)rrrr.=sz0_localized_month.__getitem__..)Ú_monthsÚ isinstanceÚslicer3)rr-Úfuncsr)rrÚ __getitem__:s  z_localized_month.__getitem__cCsdS)Né r)rrrrÚ__len__Asz_localized_month.__len__N) r r!r"Úranger5Úinsertrr9r;rrrrr(2s r(c@s6eZdZdd„edƒDƒZdd„Zdd„Zdd „Zd S) Ú_localized_daycCs g|]}tjdd|dƒj‘qS)iÑr#)r)r*r+)r,r-rrrr.Hsz_localized_day.écCs ||_dS)N)r3)rr3rrrrJsz_localized_day.__init__cs4ˆj|}t|tƒr&‡fdd„|DƒS|ˆjƒSdS)Ncsg|]}|ˆjƒ‘qSr)r3)r,r4)rrrr.Psz._localized_day.__getitem__..)Ú_daysr6r7r3)rr-r8r)rrr9Ms  z_localized_day.__getitem__cCsdS)Nr?r)rrrrr;Tsz_localized_day.__len__N)r r!r"r<r@rr9r;rrrrr>Esr>z%Az%az%Bz%br?cCs$|ddko"|ddkp"|ddkS)z5Return True for leap years, False for non-leap years.érédi�r)ÚyearrrrrdscCs@|d8}|d8}|d|d|d|d|d|dS)zFReturn number of leap years in range [y1, y2). Assume y1 <= y2.r#rArBi�r)Zy1Zy2rrrriscCstj|||ƒjƒS)zTReturn weekday (0-6 ~ Mon-Sun) for year (1970-...), month (1-12), day (1-31).)r)r*r )rCr Údayrrrr qscCsLd|kodkns t|ƒ‚t||dƒ}t||tko@t|ƒ}||fS)zQReturn weekday (0-6 ~ Mon-Sun) and number of days (28-31) for year, month.r#r/)rr ÚmdaysÚFebruaryr)rCr Úday1Úndaysrrrr ws  c@sŠeZdZdZddd„Zdd„Zdd„ZeeeƒZd d „Z d d „Z d d„Z dd„Z dd„Z dd„Zdd„Zd dd„Zd!dd„Zd"dd„ZdS)#rzo Base calendar class. This class doesn't do any formatting. It simply provides data to subclasses. rcCs ||_dS)N)r)rrrrrr‡szCalendar.__init__cCs |jdS)Nr?)Ú _firstweekday)rrrrÚgetfirstweekdayŠszCalendar.getfirstweekdaycCs ||_dS)N)rI)rrrrrr�szCalendar.setfirstweekdayccs*x$t|j|jdƒD]}|dVqWdS)zt Return an iterator for one week of weekday numbers starting with the configured first one. r?N)r<r)rr-rrrÚ iterweekdays’szCalendar.iterweekdaysc csŠtj||dƒ}|jƒ|jd}|tj|d�8}tjdd�}xH|Vy ||7}Wntk rfPYnX|j|kr>|jƒ|jkr>Pq>WdS)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. r#r?)ÚdaysN)r)r*r rZ timedeltaÚ OverflowErrorr )rrCr r*rLZonedayrrrÚitermonthdatesšs  zCalendar.itermonthdatesccs4x.t|j||ƒ|jƒD]\}}||dfVqWdS)zž Like itermonthdates(), but will yield (day number, weekday number) tuples. For days outside the specified month the day number is 0. r?N)Ú enumerateÚ itermonthdaysr)rrCr r-ÚdrrrÚitermonthdays2¯szCalendar.itermonthdays2ccsft||ƒ\}}||jd}td|ƒEdHtd|dƒEdH|j||d}td|ƒEdHdS)z† Like itermonthdates(), but will yield day numbers. For days outside the specified month the day number is 0. r?rNr#)r rrr<)rrCr rGrHZ days_beforeZ days_afterrrrrP·s zCalendar.itermonthdayscs.t|j||ƒƒ‰‡fdd„tdtˆƒdƒDƒS)z� Return a matrix (list of lists) representing a month's calendar. Each row represents a week; week entries are datetime.date values. csg|]}ˆ||d…‘qS)r?r)r,r-)Údatesrrr.Ész/Calendar.monthdatescalendar..rr?)ÚlistrNr<Úlen)rrCr r)rSrÚmonthdatescalendarÃszCalendar.monthdatescalendarcs.t|j||ƒƒ‰‡fdd„tdtˆƒdƒDƒS)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. csg|]}ˆ||d…‘qS)r?r)r,r-)rLrrr.Ósz/Calendar.monthdays2calendar..rr?)rTrRr<rU)rrCr r)rLrÚmonthdays2calendarËszCalendar.monthdays2calendarcs.t|j||ƒƒ‰‡fdd„tdtˆƒdƒDƒS)zˆ Return a matrix representing a month's calendar. Each row represents a week; days outside this month are zero. csg|]}ˆ||d…‘qS)r?r)r,r-)rLrrr.Ûsz.Calendar.monthdayscalendar..rr?)rTrPr<rU)rrCr r)rLrÚmonthdayscalendarÕszCalendar.monthdayscalendarécs>‡‡fdd„tttdƒDƒ‰‡‡fdd„tdtˆƒˆƒDƒS)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. csg|]}ˆjˆ|ƒ‘qSr)rV)r,r-)rrCrrr.åsz.Calendar.yeardatescalendar..r/csg|]}ˆ||ˆ…‘qSrr)r,r-)ÚmonthsÚwidthrrr.èsr)r<ÚJanuaryrU)rrCr[r)rZrr[rCrÚyeardatescalendarÝs zCalendar.yeardatescalendarcs>‡‡fdd„tttdƒDƒ‰‡‡fdd„tdtˆƒˆƒDƒS)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. csg|]}ˆjˆ|ƒ‘qSr)rW)r,r-)rrCrrr.òsz.Calendar.yeardays2calendar..r/csg|]}ˆ||ˆ…‘qSrr)r,r-)rZr[rrr.õsr)r<r\rU)rrCr[r)rZrr[rCrÚyeardays2calendarês zCalendar.yeardays2calendarcs>‡‡fdd„tttdƒDƒ‰‡‡fdd„tdtˆƒˆƒDƒS)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. csg|]}ˆjˆ|ƒ‘qSr)rX)r,r-)rrCrrr.þsz-Calendar.yeardayscalendar..r/csg|]}ˆ||ˆ…‘qSrr)r,r-)rZr[rrr.sr)r<r\rU)rrCr[r)rZrr[rCrÚyeardayscalendar÷s zCalendar.yeardayscalendarN)r)rY)rY)rY)r r!r"Ú__doc__rrJrÚpropertyrrKrNrRrPrVrWrXr]r^r_rrrrr�s     c@sjeZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zdd d„Z ddd„Z ddd„Z d dd„Z d!dd„Z dS)"rzr Subclass of Calendar that outputs a calendar as a simple plain text similar to the UNIX program cal. cCst|j||ƒdd�dS)z3 Print a single week (no newline). ú )ÚendN)ÚprintÚ formatweek)rÚtheweekr[rrrÚprweek szTextCalendar.prweekcCs |dkrd}nd|}|j|ƒS)z* Returns a formatted day. rr0z%2i)Úcenter)rrDr r[ÚsrrrÚ formatdayszTextCalendar.formatdaycsdj‡‡fdd„|DƒƒS)zA Returns a single week in a string (no newline). rbc3s |]\}}ˆj||ˆƒVqdS)N)rj)r,rQÚwd)rr[rrú sz*TextCalendar.formatweek..)Újoin)rrfr[r)rr[rreszTextCalendar.formatweekcCs(|dkrt}nt}||d|…j|ƒS)z4 Returns a formatted week day name. é N)rrrh)rrDr[ÚnamesrrrÚ formatweekday szTextCalendar.formatweekdaycsdj‡‡fdd„ˆjƒDƒƒS)z- Return a header for a week. rbc3s|]}ˆj|ˆƒVqdS)N)rp)r,r-)rr[rrrl.sz0TextCalendar.formatweekheader..)rmrK)rr[r)rr[rÚformatweekheader*szTextCalendar.formatweekheaderTcCs"t|}|rd||f}|j|ƒS)z0 Return a formatted month name. z%s %r)rrh)rÚtheyearÚthemonthr[ÚwithyearrirrrÚformatmonthname0s zTextCalendar.formatmonthnamercCst|j||||ƒdd�dS)z+ Print a month's calendar. r0)rcN)rdÚ formatmonth)rrrrsÚwÚlrrrr 9szTextCalendar.prmonthcCsštd|ƒ}td|ƒ}|j||d|ddƒ}|jƒ}|d|7}||j|ƒjƒ7}|d|7}x4|j||ƒD]$}||j||ƒjƒ7}|d|7}qnW|S)z@ Return a month's calendar string (multi-line). r$r#r?Ú )ÚmaxruÚrstriprqrWre)rrrrsrwrxriÚweekrrrrv?s    zTextCalendar.formatmonthr$r#érYcsÂtd|ƒ}td|ƒ}td|ƒ}|ddd‰g}|j}|tˆƒjˆ|||dƒjƒƒ|d|ƒˆj|ƒ‰�x@tˆjˆ|ƒƒD�]*\}} t||dt ||dddƒƒ} |d|ƒ‡‡‡fdd„| Dƒ} |t | ˆ|ƒjƒƒ|d|ƒ‡fdd„| Dƒ} |t | ˆ|ƒjƒƒ|d|ƒtd d„| Dƒƒ} xvt| ƒD]j}g}x>| D]6}|t |ƒk�rr|jd ƒn|jˆj |||ƒƒ�qTW|t |ˆ|ƒjƒƒ|d|ƒ�qFWqˆWd j |ƒS) zC Returns a year's calendar as a multi-line string. r$r#r?ryr:c3s|]}ˆjˆ|ˆdƒVqdS)FN)ru)r,Úk)Úcolwidthrrrrrrl`sz*TextCalendar.formatyear..c3s|] }ˆVqdS)Nr)r,r~)Úheaderrrrldscss|]}t|ƒVqdS)N)rU)r,Úcalrrrrlhsr0)rzÚappendÚreprrhr{rqrOr^r<ÚminÚ formatstringrUrerm)rrrrwrxÚcÚmÚvÚar-ÚrowrZroZheadersZheightÚjZweeksr�r)rr€rrrrÚ formatyearOs:   &  $     zTextCalendar.formatyearcCst|j|||||ƒƒdS)zPrint a year's calendar.N)rdrŒ)rrrrwrxr†r‡rrrÚpryeartszTextCalendar.pryearN)T)rr)rr)r$r#r}rY)rrr}rY)r r!r"r`rgrjrerprqrur rvrŒr�rrrrrs     %c@sjeZdZdZdddddddgZd d „Zd d „Zd d„Zdd„Zddd„Z ddd„Z ddd„Z d dd„Z dS)!rz4 This calendar returns complete HTML pages. ZmonZtueZwedZthuZfriZsatZsuncCs"|dkr dSd|j||fSdS)z/ Return a day as a table cell. rz z%dN)Ú cssclasses)rrDr rrrrj�szHTMLCalendar.formatdaycs dj‡fdd„|Dƒƒ}d|S)z8 Return a complete week as a table row. r0c3s|]\}}ˆj||ƒVqdS)N)rj)r,rQrk)rrrrlŽsz*HTMLCalendar.formatweek..z %s)rm)rrfrir)rrreŠszHTMLCalendar.formatweekcCsd|j|t|fS)z: Return a weekday name as a table header. z%s)rŽr)rrDrrrrp‘szHTMLCalendar.formatweekdaycs$dj‡fdd„ˆjƒDƒƒ}d|S)z< Return a header for a week as a table row. r0c3s|]}ˆj|ƒVqdS)N)rp)r,r-)rrrrl›sz0HTMLCalendar.formatweekheader..z %s)rmrK)rrir)rrrq—szHTMLCalendar.formatweekheaderTcCs*|rdt||f}n dt|}d|S)z5 Return a month name as a table row. z%s %sz%sz.%s)r)rrrrsrtrirrrružs zHTMLCalendar.formatmonthnamecCs�g}|j}|dƒ|dƒ||j|||d�ƒ|dƒ||jƒƒ|dƒx*|j||ƒD]}||j|ƒƒ|dƒqXW|dƒ|dƒdj|ƒS)z6 Return a formatted month as a table. z@ry)rtz
r0)r‚rurqrWrerm)rrrrsrtrˆr‰r|rrrrv¨s  zHTMLCalendar.formatmonthrYcCs¶g}|j}t|dƒ}|dƒ|dƒ|d||fƒxntttd|ƒD]Z}t|t||dƒƒ}|dƒx0|D](}|dƒ||j||d d �ƒ|d ƒqlW|d ƒqFW|d ƒdj|ƒS)z? Return a formatted year as a table of tables. r#z?ryz.r/r:zzzz
%s
F)rtz
r0)r‚rzr<r\r„rvrm)rrrr[rˆr‰r-rZr‡rrrrŒ»s     zHTMLCalendar.formatyearú calendar.cssNcCs¬|dkrtjƒ}g}|j}|d|ƒ|dƒ|dƒ|dƒ|d|ƒ|dk r^|d|ƒ|d|ƒ|d ƒ|d ƒ||j||ƒƒ|d ƒ|d ƒd j|ƒj|dƒS)zB Return a formatted year as a complete HTML page. Nz$ zn z z zC z4 zCalendar for %d z z z z r0Úxmlcharrefreplace)ÚsysÚgetdefaultencodingr‚rŒrmÚencode)rrrr[ÚcssÚencodingrˆr‰rrrÚformatyearpageÑs$    zHTMLCalendar.formatyearpage)T)T)rY)rYr�N) r r!r"r`rŽrjrerprqrurvrŒr–rrrrrys   c@s$eZdZdd„Zdd„Zdd„ZdS)Údifferent_localecCs ||_dS)N)Úlocale)rr˜rrrrêszdifferent_locale.__init__cCs"tjtjƒ|_tjtj|jƒdS)N)Ú_localeZ getlocaleÚLC_TIMEÚ oldlocaleÚ setlocaler˜)rrrrÚ __enter__íszdifferent_locale.__enter__cGstjtj|jƒdS)N)r™rœršr›)rÚargsrrrÚ__exit__ñszdifferent_locale.__exit__N)r r!r"rr�rŸrrrrr—ésr—c@s,eZdZdZd dd„Zdd„Zd d d „ZdS) ra This class can be passed a locale name in the constructor and will return month and weekday names in the specified locale. If this locale includes an encoding all strings containing month and weekday names will be returned as unicode. rNcCs&tj||ƒ|dkrtjƒ}||_dS)N)rrr™Úgetdefaultlocaler˜)rrr˜rrrrýs zLocaleTextCalendar.__init__c CsBt|jƒ�.|dkrt}nt}||}|d|…j|ƒSQRXdS)Nrn)r—r˜rrrh)rrDr[roÚnamerrrrps  z LocaleTextCalendar.formatweekdayTc Cs8t|jƒ�$t|}|r$d||f}|j|ƒSQRXdS)Nz%s %r)r—r˜rrh)rrrrsr[rtrirrrru s   z"LocaleTextCalendar.formatmonthname)rN)T)r r!r"r`rrprurrrrrõs  c@s,eZdZdZd dd„Zdd„Zd d d „ZdS) ra This class can be passed a locale name in the constructor and will return month and weekday names in the specified locale. If this locale includes an encoding all strings containing month and weekday names will be returned as unicode. rNcCs&tj||ƒ|dkrtjƒ}||_dS)N)rrr™r r˜)rrr˜rrrrs zLocaleHTMLCalendar.__init__c Cs0t|jƒ�t|}d|j||fSQRXdS)Nz%s)r—r˜rrŽ)rrDrirrrrp!s z LocaleHTMLCalendar.formatweekdayTc Cs6t|jƒ�"t|}|r$d||f}d|SQRXdS)Nz%s %sz.%s)r—r˜r)rrrrsrtrirrrru&s   z"LocaleHTMLCalendar.formatmonthname)rN)T)r r!r"r`rrprurrrrrs cCs*t|kotkns t|ƒ‚|t_dS)N)ÚMONDAYÚSUNDAYrr†r)rrrrr3srYr}cCstt|||ƒƒdS)z1Prints multi-column formatting for year calendarsN)rdr…)ÚcolsrÚspacingrrrr3Gsr3cs |d9}|j‡fdd„|DƒƒS)zEReturns a string formatted from n strings, centered within n columns.rbc3s|]}|jˆƒVqdS)N)rh)r,r†)rrrrlOszformatstring..)rm)r¤rr¥r)rrr…Lsr…i²c Cs^|dd…\}}}}}}tj||dƒjƒt|d}|d|}|d|} | d|} | S)zBUnrelated but handy function to calculate Unix timestamp from GMT.Nr}r#éé<)r)r*Ú toordinalÚ _EPOCH_ORD) ÚtuplerCr rDZhourZminuteÚsecondrLZhoursZminutesZsecondsrrrrVs    c Cs®ddl}|jƒ}|jdƒ}|jdƒ}|jddtddd�|jd d td d d�|jd dtddd�|jddtddd�|jddddd�|jddddd�|jddddd�|jd d!d"d3d$d%�|jd&d'td(d)�|jd*d'td+d)�|j|d d…ƒ}|j�r|j �r|jd,ƒt j d ƒ|j|jf}|j d#k�rÜ|j�rFt |d-�}nt ƒ}|j}|dk�rdt jƒ}t||jd.�} t jjj} |jdk�r¤| |jtjjƒjf| Žƒn6|jdk�rÆ| |j|jf| Žƒn|jd/ƒt j d ƒnÎ|j�rðt|d-�}ntƒ}t|j|jd0�} |jdk�r&|j| d1<|j| d2<|jdk�rJ|j tjjƒjf| Ž} n2|jdk�rh|j |jf| Ž} n|j!|j|jf| Ž} t jj} |j�r¢| j"|jƒ} t jjj} | | ƒdS)4Nrztext only argumentszhtml only argumentsz-wz--widthr$z width of date column (default 2))ÚtypeÚdefaultÚhelpz-lz--linesr#z)number of lines for each week (default 1)z-sz --spacingr}z"spacing between months (default 6)z-mz--monthsrYzmonths per row (default 3)z-cz--cssz calendar.csszCSS to use for page)r­r®z-Lz--localez.locale to be used from month and weekday namesz-ez --encodingzencoding to use for outputz-tz--typeÚtextÚhtmlzoutput type (text or html))r­Úchoicesr®rCú?zyear number (1-9999))Únargsr¬r®r zmonth number (1-12, text only)z/if --locale is specified --encoding is required)r˜)r•r”zincorrect number of arguments)rwrxr†r‡)r¯r°)#ÚargparseÚArgumentParserZadd_argument_groupÚ add_argumentÚintÚ parse_argsr˜r•Úerrorr‘Úexitr¬rrr’Údictr”ÚstdoutÚbufferÚwriterCr–r)r*Ztodayr rrr[Úlinesr¥rZrŒrvr“) ržr´ÚparserZ textgroupZ htmlgroupZoptionsr˜r�r•Zoptdictr¾ÚresultrrrÚmain`s¤                     rÂÚ__main__éé)Fr`r‘r)r˜r™Ú itertoolsrÚ__all__Ú ValueErrorr¹rrr\rFrEr(r>rrrrr<r¢ZTUESDAYZ WEDNESDAYZTHURSDAYZFRIDAYZSATURDAYr£rrr r Úobjectrrrr—rrr†rJrrrXr rgrer|rqrr rvr rŒrr�rZ _colwidthZ_spacingr3r…ZEPOCHr*r¨r©rrÂr ÚargvrrrrÚsn     up  h