staticwebapp-hhv-tormakrist.../api/hanyadikhetvan/__init__.py

13 lines
338 B
Python
Raw Permalink Normal View History

2022-05-21 22:53:54 +02:00
from math import floor
from datetime import date
2022-07-31 19:32:13 +02:00
from urllib import request
2022-05-21 22:53:54 +02:00
import azure.functions as func
def main(req: func.HttpRequest) -> func.HttpResponse:
2023-08-31 18:48:41 +02:00
startdate = date(2023, 9, 4)
2022-05-21 22:53:54 +02:00
currentweek = floor((date.today() - startdate).days / 7)
return func.HttpResponse(
str(currentweek),
status_code=200)