diff options
-rwxr-xr-x | debdate | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -35,9 +35,9 @@ RELEASES = [ (datetime.date(1996, 12, 12), 'rex'), (datetime.date(1996, 6, 17), 'buzz'), ] -MSG = "Today is day {dody} of year {yodr} of the {release}" -FUTURE_MSG = "Today could be day {dody} of year {yodr} of the {release}" -ERR_MSG = "Today is {isodate} of the Debianless Age" +MSG = "{today} is day {dody} of year {yodr} of the {release}" +FUTURE_MSG = "{today} could be day {dody} of year {yodr} of the {release}" +ERR_MSG = "{isodate} is in the Debianless Age" class DebDate: @@ -80,6 +80,10 @@ class DebDate: data['certain'] = math.exp((today - day).days / 365.25 ) else: data['certain'] = 1 + if day == today: + data['today'] = 'Today' + else: + data['today'] = day.isoformat() for r in self.releases: epoch = r[0] data['release'] = r[1] |