functionapp-hanyadikhetvan-.../hanyadikhetvan/__init__.py

12 lines
312 B
Python
Raw Normal View History

2022-05-18 01:36:01 +02:00
from math import floor
from datetime import date
2022-05-17 22:57:06 +02:00
import azure.functions as func
def main(req: func.HttpRequest) -> func.HttpResponse:
2022-06-08 23:06:07 +02:00
startdate = date(2022, 8, 29)
2022-05-18 01:37:50 +02:00
currentweek = floor((date.today() - startdate).days / 7)
2022-05-17 22:57:06 +02:00
return func.HttpResponse(
2022-05-18 01:37:50 +02:00
str(currentweek),
2022-05-17 22:57:06 +02:00
status_code=200)