Esempio n. 1
0
 def day_of_week(self):
     """"
     Get week name of the duty day.
     """
     if self.date:
         return h.day_of_week(self.date)
     return ""
Esempio n. 2
0
 def day_or_date(self):
     """
     Return day of week if the duty is recurrent,
     or date if it is a one-time.
     """
     if self.recurrent and self.date <= now().date():
         return self.day_of_week()
     return "%s (%s)" % (str(self.date), h.day_of_week(self.date, use_short=True))
def day_of_week(day):
    return h.day_of_week(day)