SharkyEXE icon

Untitled

SharkyEXE | PRO | 01/13/19 04:08:39 PM UTC | 0 ⭐ | 785 👁️ | Never ⏰ | []
text |

920 B

|

None

|

0 👍

/

0 👎

           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)

Comments