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

11 lines
276 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-05-18 01:36:01 +02:00
startdate = date(2022, 2, 6)
2022-05-17 22:57:06 +02:00
return func.HttpResponse(
2022-05-18 01:36:01 +02:00
floor((date.today() - startdate).days / 7),
2022-05-17 22:57:06 +02:00
status_code=200)