Advertisement
SharkyEXE

Untitled

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