如何使用googlecalenderapi python查找两个事件之间的时间差

2024-10-04 03:19:14 发布

您现在位置:Python中文网/ 问答频道 /正文

我正试图创建一个程序,检查我的谷歌日历时,我一直在工作,无论是加班或正常的费率,然后计算我应该支付的金额为那个月。我已经阅读了googleapi的参考资料,但我没有运气。这是我的伪代码:

Get events for month
Write events to file split each value with comma
Check each event for keyword work else remove from file
For each line check amount of hours worked and append to end of line
If day = Sunday or event name = work (Overtime BH) append value to BankHolidayHours Variable
If day = Thursday or Saturday append value to ContractedHours variable
    Else write to OvertimeHours variable 
BankHolidayTotal = BankHolidayHours * BHRate
ContractedHoursTotal = ContractedHours * CHRate
OvertimeHoursTotal = OvertimeHours * OHRate
Print OvetimeHoursTotal & ContractedHoursTotal & BankHolidayTotal to screen

任何帮助都将不胜感激。你知道吗


Tags: oroftoeventforifvalueline