#NEWLINE# def __init__( self , cal_id , cal_date , limit , var_name ) : #NEWLINE# #INDENT# sd = cal_date [ 1 : ( - 1 ) ] #NEWLINE# if sd : #NEWLINE# #INDENT# sd = map ( int , sd . split ( '-' ) ) #NEWLINE# start_date = datetime . datetime ( sd [ 0 ] , sd [ 1 ] , sd [ 2 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# start_date = datetime . datetime . today ( ) #NEWLINE# #UNINDENT# limits = limit [ 1 : ( - 1 ) ] . split ( ',' ) #NEWLINE# self . start_date = ( start_date - datetime . timedelta ( days = int ( limits [ 0 ] ) ) ) #NEWLINE# self . end_date = ( start_date + datetime . timedelta ( days = int ( limits [ 1 ] ) ) ) #NEWLINE# self . var_name = var_name #NEWLINE# self . cal_id = cal_id