forked from indymedia/epicyon
Get current date
parent
b73eda6826
commit
42676fdacc
|
@ -3766,18 +3766,10 @@ def todaysEventsCheck(baseDir: str,nickname: str,domain: str) -> bool:
|
||||||
"""Are there calendar events today?
|
"""Are there calendar events today?
|
||||||
"""
|
"""
|
||||||
now=datetime.now()
|
now=datetime.now()
|
||||||
if not currYear:
|
year=now.year
|
||||||
year=now.year
|
monthNumber=now.month
|
||||||
else:
|
dayNumber=now.day
|
||||||
year=currYear
|
|
||||||
if not currMonthNumber:
|
|
||||||
monthNumber=now.month
|
|
||||||
else:
|
|
||||||
monthNumber=currMonthNumber
|
|
||||||
if not currDayOfMonth:
|
|
||||||
dayNumber=now.day
|
|
||||||
else:
|
|
||||||
dayNumber=currDayOfMonth
|
|
||||||
calendarFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/calendar/'+str(year)+'/'+str(monthNumber)+'.txt'
|
calendarFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/calendar/'+str(year)+'/'+str(monthNumber)+'.txt'
|
||||||
if not os.path.isfile(calendarFilename):
|
if not os.path.isfile(calendarFilename):
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue