add function to get weekdays

This commit is contained in:
Himanshu Warekar 2019-02-21 11:11:38 +05:30
parent f638a500ae
commit a6ce45240d

View file

@ -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)