ÿþ/ / åegWšI‹ 
 f u n c t i o n   c h k D a t e ( d a t e s t r )   {    
         v a r   y e a r ,   m o n t h ,   d a y ;    
         v a r   p a t t e r n   =   / ^ \ d { 4 } \ / \ d { 1 , 2 } \ / \ d { 1 , 2 } $ / ;    
         v a r   t m p a r y     =   n e w   A r r a y ( )    
         i f   ( ! p a t t e r n . t e s t ( d a t e s t r ) )     r e t u r n   f a l s e ;    
  
         t m p a r y   =   d a t e s t r . s p l i t ( " / " ) ;    
         y e a r     =   t m p a r y [ 0 ] ;    
         m o n t h   =   t m p a r y [ 1 ] ;    
         d a y       =   t m p a r y [ 2 ] ;    
  
         i f   ( m o n t h < 1   | |   m o n t h > 1 2   | |   d a y > 3 1   | |   d a y < 1 )     r e t u r n   f a l s e ;    
  
         i f   ( m o n t h   = =   2   & &   d a y   >   2 8 )   {    
                 i f   ( ( y e a r % 4 = = 0   & &   y e a r % 1 0 0 ! = 0 )   | |   ( y e a r % 4 0 0 = = 0 ) )   {   / /   ¬ ° ¶ | ¦ ~    
                         i f   ( d a y   >   2 9 )   r e t u r n   f a l s e ;    
                 }    
                 e l s e   {     / /   « D ¶ | ¦ ~    
                         r e t u r n   f a l s e ;    
                 }    
         }    
         i f   ( d a y > 3 0   & &   ( ( m o n t h   %   2 )   = =   M a t h . f l o o r ( m o n t h / 8 ) ) )   r e t u r n   f a l s e ;    
  
         r e t u r n   t r u e ;    
 }    
  
  
  
  
 
