File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ cdef inline object _parse_delimited_date(str date_string, bint dayfirst):
149149        Py_ssize_t length
150150        int  day =  1 , month =  1 , year
151151        bint can_swap =  0 
152+         bint swapped_day_and_month =  0 
152153
153154    buf =  get_c_string_buf_and_size(date_string, & length)
154155    if  length ==  10 :
@@ -177,12 +178,12 @@ cdef inline object _parse_delimited_date(str date_string, bint dayfirst):
177178        #  date_string can't be converted to date, above format
178179        return  None , None 
179180
180-     swapped_day_and_month =  False 
181+     swapped_day_and_month =  0 
181182    if  1  <=  month <=  MAX_DAYS_IN_MONTH and  1  <=  day <=  MAX_DAYS_IN_MONTH \
182183            and  (month <=  MAX_MONTH or  day <=  MAX_MONTH):
183184        if  (month >  MAX_MONTH or  (day <=  MAX_MONTH and  dayfirst)) and  can_swap:
184185            day, month =  month, day
185-             swapped_day_and_month =  True 
186+             swapped_day_and_month =  1 
186187        if  dayfirst and  not  swapped_day_and_month:
187188            warnings.warn(
188189                PARSING_WARNING_MSG.format(
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments