题目要求:
https://leetcode-cn.com/problems/day-of-the-year/
python中strptime函数的用法:
https://www.runoob.com/python/att-time-strptime.html
import time
class Solution:
def dayOfYear(self, date: str) -> int:
return time.strptime(date, "%Y-%m-%d")[-2]