AlkantarClanX12

Your IP : 18.190.160.6


Current Path : /lib64/python2.7/Demo/scripts/
Upload File :
Current File : //lib64/python2.7/Demo/scripts/unbirthday.pyo

�
Afc@sbddlZddlZddlZd�Zd�Zd�Zd�Zedkr^e�ndS(i����NcCs�tjdr#ttjd�}nttd��}d|koLdknrsdG|G|d}dG|GdGHn3d	|ko�tj�dkns�d
G|GHdStjdr�ttjd�}nttd��}d|ko�d
knsdG|GHdStjdr'ttjd�}nttd��}|dkr]tj|�r]d}n
tj|}d|ko�|kns�dG|GdGHdS|||f}t	|�}dGt
|�GHtj�d }t	|�}dGt
|�GH||krdGHdS||krdGHdS||}dG|GdGHd}	xQt||dd�D]8}
||
||fkoq|knrK|	d}	qKqKWdG|	GdGH|d|dkr�dGt|	�GdGHdGndGt||	�Gd GHdS(!NisIn which year were you born? iidsI'll assume that byilsyou meansand not the early Christian erai:s%It's hard to believe you were born inisAnd in which month? (1-12) isThere is no month numberedis&And on what day of that month? (1-31) isThere are nosdays in that month!sYou were born onsToday iss0You are a time traveler.  Go back to the future!s'You were born today.  Have a nice life!sYou have livedtdayssYou ares	years oldsCongratulations!  Today is yourtbirthdaysYesterday was yours
Today is yourt
unbirthday(
tsystargvtintt	raw_inputttimet	localtimetcalendartisleaptmdaystmkdatetformattrangetnth(tyeartmonthtdaytmaxdayt	bdaytupletbdaydatet
todaytuplet	todaydateRtagety((s//usr/lib64/python2.7/Demo/scripts/unbirthday.pytmainsb

&	
	
	



%
cCs'|\}}}d|tj||fS(Ns%d %s %d(R	t
month_name(t.0RRR((s//usr/lib64/python2.7/Demo/scripts/unbirthday.pyR
NscCs8|dkrdS|dkr dS|dkr0dSd|S(Nit1stit2ndit3rds%dth((tn((s//usr/lib64/python2.7/Demo/scripts/unbirthday.pyRQscCs�|\}}}|d}||dd}||dd}||dd}xPtd|�D]?}|d	kr�tj|�r�|d
}q_|tj|}q_W||}|S(Nimiiicidi�i�iii(RR	R
R(RRRRRti((s//usr/lib64/python2.7/Demo/scripts/unbirthday.pyRWs


t__main__(RRR	RR
RRt__name__(((s//usr/lib64/python2.7/Demo/scripts/unbirthday.pyt<module>s	B