???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................ó
Afc           @   sb   d  d l  Z  d  d l Z d  d l Z d „  Z d „  Z d „  Z d „  Z e d k r^ e ƒ  n  d S(   iÿÿÿÿNc          C   sÝ  t  j d r# t t  j d ƒ }  n t t d ƒ ƒ }  d |  k oL d k  n rs d G|  G|  d }  d G|  Gd GHn3 d	 |  k o” t j ƒ  d k n s¦ d
 G|  GHd  St  j d rÉ t t  j d ƒ } n t t d ƒ ƒ } d | k oò d k n sd G| GHd  St  j d r't t  j d ƒ } n t t d ƒ ƒ } | d k r]t j |  ƒ r]d } n t j | } d | k o| k n s—d G| Gd GHd  S|  | | f } t	 | ƒ } d Gt
 | ƒ GHt j ƒ  d  } t	 | ƒ } d Gt
 | ƒ GH| | k rd GHd  S| | k rd GHd  S| | } d G| Gd GHd }	 xQ t |  | d d ƒ D]8 }
 | |
 | | f k  oq| k n rK|	 d }	 qKqKWd G|	 Gd GH| d | d k rÂd Gt |	 ƒ Gd GHd Gn d Gt | |	 ƒ Gd  GHd  S(!   Ni   s   In which year were you born? i    id   s   I'll assume that byil  s   you means   and not the early Christian erai:  s%   It's hard to believe you were born ini   s   And in which month? (1-12) i   s   There is no month numberedi   s&   And on what day of that month? (1-31) i   s   There are nos   days in that month!s   You were born ons   Today iss0   You are a time traveler.  Go back to the future!s'   You were born today.  Have a nice life!s   You have livedt   dayss   You ares	   years olds   Congratulations!  Today is yourt   birthdays   Yesterday was yours   Today is yourt
   unbirthday(   t   syst   argvt   intt	   raw_inputt   timet	   localtimet   calendart   isleapt   mdayst   mkdatet   formatt   ranget   nth(   t   yeart   montht   dayt   maxdayt	   bdaytuplet   bdaydatet
   todaytuplet	   todaydateR    t   aget   y(    (    s/   /usr/lib64/python2.7/Demo/scripts/unbirthday.pyt   main   sb    
&			
%c         C   s'   |  \ } } } d | t  j | | f S(   Ns   %d %s %d(   R	   t
   month_name(   t   .0R   R   R   (    (    s/   /usr/lib64/python2.7/Demo/scripts/unbirthday.pyR   N   s    c         C   s8   |  d k r d S|  d k r  d S|  d k r0 d Sd |  S(   Ni   t   1sti   t   2ndi   t   3rds   %dth(    (   t   n(    (    s/   /usr/lib64/python2.7/Demo/scripts/unbirthday.pyR   Q   s       c         C   s°   |  \ } } } | d } | | d d } | | d d } | | d d } xP t  d | ƒ D]? } | d	 k r t j | ƒ r | d
 } q_ | t j | } q_ W| | } | S(   Nim  i   i   ic   id   i  i  i   i   i   (   R   R	   R
   R   (   R   R   R   R   R    t   i(    (    s/   /usr/lib64/python2.7/Demo/scripts/unbirthday.pyR   W   s    

t   __main__(   R   R   R	   R   R   R   R   t   __name__(    (    (    s/   /usr/lib64/python2.7/Demo/scripts/unbirthday.pyt   <module>   s   	B			