mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-30 13:10:56 +00:00
fix the monday
This commit is contained in:
parent
c40c991320
commit
28a2468cf8
1 changed files with 4 additions and 5 deletions
|
|
@ -11,13 +11,12 @@ from etl.validator.validator import DomnaSharePointValidator
|
|||
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
def previous_monday():
|
||||
def this_weeks_monday():
|
||||
today = datetime.today()
|
||||
last_monday = today - timedelta(days=today.weekday() + 7) # Go back to last week's Monday
|
||||
# return f"W.C. 31.09.2000"
|
||||
return f"W.C. {last_monday.strftime('%d.%m.%Y')}"
|
||||
monday = today - timedelta(days=today.weekday()) # weekday() = 0 for Monday
|
||||
return f"W.C. {monday.strftime('%d.%m.%Y')}"
|
||||
|
||||
WEEK_COMMENCING = os.getenv("WEEK_COMMENCING", previous_monday())
|
||||
WEEK_COMMENCING = os.getenv("WEEK_COMMENCING", this_weeks_monday())
|
||||
|
||||
class SharePointInstaller(Enum):
|
||||
# https//{tenant}.sharepoint.com/sites/{site}/_api/site/id
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue