Reorganized stages views in a subdirectory
This commit is contained in:
parent
772b0b6b01
commit
f2bd9734af
9 changed files with 484 additions and 472 deletions
|
|
@ -1,3 +1,6 @@
|
|||
from datetime import date
|
||||
|
||||
|
||||
def school_year(date, as_tuple=False):
|
||||
"""
|
||||
Return the school year of 'date'. Example:
|
||||
|
|
@ -14,6 +17,15 @@ def school_year(date, as_tuple=False):
|
|||
return "%d — %d" % (start_year, start_year + 1)
|
||||
|
||||
|
||||
def school_year_start():
|
||||
""" Return first official day of current school year """
|
||||
current_year = date.today().year
|
||||
if date(current_year, 8, 1) > date.today():
|
||||
return date(current_year-1, 8, 1)
|
||||
else:
|
||||
return date(current_year, 8, 1)
|
||||
|
||||
|
||||
def is_int(s):
|
||||
try:
|
||||
int(s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue