-1
for wk in sorted(out.keys()):
rec_date = datetime.datetime(*xlrd.xldate_as_tuple(wk, inputfp.datemode)).isocalendar()[1]#search for dates of current week
if rec_date == datetime.date.today().isocalendar()[1]:#conditions to check current week dates
print '\nCurrent Week Number::' ,rec_date #printing the current week number
print 'Total Effort::',str(out[wk]) #total efforts of current week date
下面是代碼,按照目前的週日期的加入細節,但我不需要根據這一週的日期本週的所有時間總和如何獲取本週的總詳情?
輸出我得到:
當前週數: :37 總工作量:: 29
當前週數:: 37 總工作量:: 18
當前週數:: 37 ŧ otal努力:: 20
我應該得到這樣本週和總工作量輸出:
當前週數:: 37 總工作量:: 67