add function to get weekdays
This commit is contained in:
parent
f638a500ae
commit
a6ce45240d
1 changed files with 3 additions and 0 deletions
|
|
@ -253,6 +253,9 @@ def format_datetime(datetime_string, format_string=None):
|
|||
formatted_datetime = datetime.strftime('%Y-%m-%d %H:%M:%S')
|
||||
return formatted_datetime
|
||||
|
||||
def weekdays():
|
||||
return ['Monday', 'Tuesday', 'Wednesday', 'Thursday','Friday', 'Saturday', 'Sunday']
|
||||
|
||||
def global_date_format(date, format="long"):
|
||||
"""returns localized date in the form of January 1, 2012"""
|
||||
date = getdate(date)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue