Subversion Repositories SmartDukaan

Rev

Rev 7256 | Rev 7275 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7256 Rev 7272
Line 230... Line 230...
230
    Returns the actual no. of days which will pass while 'delivery_days'
230
    Returns the actual no. of days which will pass while 'delivery_days'
231
    no. of business days will pass since 'order_time'. 
231
    no. of business days will pass since 'order_time'. 
232
    '''
232
    '''
233
    start_date = start_time.date()
233
    start_date = start_time.date()
234
    end_date = start_date + datetime.timedelta(days = delivery_days)
234
    end_date = start_date + datetime.timedelta(days = delivery_days)
235
    holidays = get_holidays(start_date, -1)
235
    holidays = get_holidays(to_java_date(start_time), -1)
236
    holidays = [to_py_date(holiday).date() for holiday in holidays]
236
    holidays = [to_py_date(holiday).date() for holiday in holidays]
237
    
237
    
238
    while start_date <= end_date:
238
    while start_date <= end_date:
239
        if start_date.weekday() == 6 or start_date in holidays:
239
        if start_date.weekday() == 6 or start_date in holidays:
240
            delivery_days = delivery_days + 1
240
            delivery_days = delivery_days + 1