Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tdd = datetime.fromtimestamp(mktime(t))-datetime(date.today().year, 1, 1)
- sec_left=tdd.days*24*60*60+tdd.seconds
- x = 1123200
- if sec_left < x:
- title_text = _("Новый Год наступил !\nС праздником !")
- return title_text
- else:
- title_text = _("До Нового , %s Года , остал%s :\n") % ( date.today().year + 1, get_variant(days, ('ся', 'ось', 'ось')))
- text = [
- '{:0>1} д{}' . format(days, get_variant(days, ('ень', 'ня', 'ней'))),
- '{:0>2} час{}' . format(hours, get_variant(hours, ('', 'а', 'ов'))),
- '{:0>2} минут{}' . format(minutes, get_variant(minutes, ('а', 'ы', ''))),
- '{:0>2} секунд{}' . format(seconds, get_variant(seconds, ('а', 'ы', '')))
- ]
- return title_text + ' ; '.join(text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement