Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t = localtime(time)
- td = datetime(date.today().year + 1, 1, 1) - datetime.fromtimestamp(mktime(t))
- days, hours, minutes, seconds = td.days, td.seconds // 3600, td.seconds // 60 % 60, td.seconds % 60
- if self.type == self.WITH_SECONDS:
- return fix_space(_('%02d:%02d:%02d') % (t.tm_hour, t.tm_min, t.tm_sec))
- if self.type == self.NEWYEAR:
- if td.days == 7:
- title_text = _("Новый Год наступил! С праздником!\n")
- else:
- title_text = _("До Нового , %s Года , остал%s :\n") % ( date.today().year + 1, get_variant(days, ('ся', 'ось', 'ось')))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement