date format "Monday at 3pm UTC" added for courses starting with-in 5 days

This commit is contained in:
Saleem Latif
2015-09-17 17:22:15 +05:00
parent 70866104bf
commit 05a72486f3
8 changed files with 198 additions and 3 deletions

View File

@@ -289,6 +289,13 @@ class CourseOverview(TimeStampedModel):
"""
return course_metadata_utils.has_course_ended(self.end)
def starts_within(self, days):
"""
Returns True if the course starts with-in given number of days otherwise returns False.
"""
return course_metadata_utils.course_starts_within(self.start, days)
def start_datetime_text(self, format_string="SHORT_DATE"):
"""
Returns the desired text corresponding the course's start date and