我正试图创建一个程序,检查我的谷歌日历时,我一直在工作,无论是加班或正常的费率,然后计算我应该支付的金额为那个月。我已经阅读了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
任何帮助都将不胜感激。你知道吗
在Python中计算两个日期之间的差异可以使用Timedelta
当然,这与googleapi无关。也许你应该问个更具体的问题。你知道吗
相关问题 更多 >
编程相关推荐