use builtin function
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-05-21 22:53:54 +02:00
parent b9b39de41c
commit deec2f0ad2
5 changed files with 39 additions and 2 deletions

View File

@ -0,0 +1,11 @@
from math import floor
from datetime import date
import azure.functions as func
def main(req: func.HttpRequest) -> func.HttpResponse:
startdate = date(2022, 2, 6)
currentweek = floor((date.today() - startdate).days / 7)
return func.HttpResponse(
str(currentweek),
status_code=200)

View File

@ -0,0 +1,19 @@
{
"scriptFile": "__init__.py",
"bindings": [
{
"authLevel": "anonymous",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [
"get"
]
},
{
"type": "http",
"direction": "out",
"name": "$return"
}
]
}