
    Mg                     X    S SK JrJ r   S SKJr  S r\" S5      \ " S5      S 5       5       rg)    )aliasplugin)Forec                     / SQnX!S:  -  nU[        US-  5      -   [        US-  5      -
  [        US-  5      -   X1S-
     -   U -   S-  $ )zM
Calculates the weekday for any date and returns 0 to Sunday, 1 to Monday...
)r            r   r   r	            r   r   r   r   d   i  r
      )int)dmyts       =/Users/admin/workspace/ai/Jarvis/jarviscli/plugins/weekday.py	dayofweekr      sc    
	AQJA#a!e*ns1s7|+1s7|Ah')*+./0 1    weekdayzday of the weekc                 .   / SQnUS:X  a  U R                  S5      nUR                  S5      n[        U5      S:  a!  U R                  S[        R
                  5        g[        US   5      n[        US	   5      n[        US
   5      nUS	:  a!  U R                  S[        R                  5        gUS	:  d  US:  a!  U R                  S[        R                  5        gUS	:  d  US:  a!  U R                  S[        R                  5        gUS:X  a*  XR;  a%  U R                  SU S3[        R                  5        gUS
:X  a'  US:  a!  U R                  S[        R                  5        g[        XEU5      nUS:X  a$  U R                  U S3[        R                  5        gUS	:X  a$  U R                  U S3[        R                  5        gUS
:X  a$  U R                  U S3[        R                  5        gUS:X  a$  U R                  U S3[        R                  5        gUS:X  a$  U R                  U S3[        R                  5        gUS:X  a$  U R                  U S3[        R                  5        gUS:X  a#  U R                  U S3[        R                  5        g)z 
Says what weekday any date is.
)r
   r   r	   r      
       z.Tell me any date using the dd/mm/aaaa format:
/r   zCSomething is worng with this date.
 Try to use "weekday dd/mm/aaaa"Nr   r
   r   zESorry, but I only can the the day of the week from year 1 onwards! :(r   z:Months go from 1 to 12! Remember to use dd/mm/aaaa format.   z8Days go from 1 to 31! Remember to use dd/mm/aaaa format.zMonth z doen't have 31 days!   z Month 2 have only 28 or 29 days!z is a Sunday!z is a Monday!z is a Tuesday!z is a Wednesday!r   z is a Thursday!r	   z is a Friday!r   z is a Saturday!)
inputsplitlensayr   ORANGEr   REDr   GREEN)jarviss	m_with_31s_splitr   r   aweek_days           r   r   r      sN    "IBwLLJK ggclG
1vax

[]a]h]hi 	GAJAGAJAGAJAs

Z\`\d\desad

OQUQYQYZsad

MtxxX"u#

VA334dhh?!t"

5txx@ q!H1}

aS&

3( % 
Q

aS&

3"  
Q

aS'4  
Q

aS()4::6  
Q

aS($**5  
Q

aS&

3
  
Q

aS($**5
r   N)r   r   coloramar   r   r    r   r   <module>r/      s9      	1 y@  @r   