Esempio n. 1
0
 def first(self):
     return day_after_tomorrow()
                menu.append( self.output().format(**dictionary) )

        self.update_menu(menu)

    def first(self):
        """
        Return the first date to start with, default is today
        """
        return today()
        
    def output(self):
        return "{day_of_week} ({date})"

    def tomorrow_text(self):
        return "Tomorrow"

    def next_text(self):
        return "next "

    def format_date(self, d):
        return custom_strftime( "{S} %b %Y", d )

if __name__ == "__main__":

    t = RelativeDateFieldUpdater('Teacher Notices Database', 'Start Date')
    u = RelativeDateFieldUpdater('Teacher Notices Database', 'End Date')
    t.first = lambda : tomorrow()
    u.first = lambda : day_after_tomorrow()
    t.update_menu_relative_dates()
    u.update_menu_relative_dates()