Telegram Group & Telegram Channel
Работаем со временем без головной боли

При работе со временем и датами у встроенных модулей есть несколько неприятных моментов:

— Их слишком много: datetime, time, calendar, dateutil, pytz и другие;
— В них слишком много типов: date, time, datetime, tzinfo, timedelta, relativedelta и т. д.

И вот на днях я наткнулся на пакет arrow, который их решает. Во-первых, там есть все необходимое. Во-вторых, все объекты имеют один и тот же тип Arrow.

Большой плюс в том, что пакет совместим с основными встроенными типами. Например, выше я преобразовал datetime в Arrow и обратно.

Еще из приятных бонусов: там есть функция humanize, которая конвертирует время в читаемый текст.

#время #arrow



tg-me.com/python_academy/623
Create:
Last Update:

Работаем со временем без головной боли

При работе со временем и датами у встроенных модулей есть несколько неприятных моментов:

— Их слишком много: datetime, time, calendar, dateutil, pytz и другие;
— В них слишком много типов: date, time, datetime, tzinfo, timedelta, relativedelta и т. д.

И вот на днях я наткнулся на пакет arrow, который их решает. Во-первых, там есть все необходимое. Во-вторых, все объекты имеют один и тот же тип Arrow.

Большой плюс в том, что пакет совместим с основными встроенными типами. Например, выше я преобразовал datetime в Arrow и обратно.

Еще из приятных бонусов: там есть функция humanize, которая конвертирует время в читаемый текст.

#время #arrow

BY Python Academy




Share with your friend now:
tg-me.com/python_academy/623

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

Telegram Be The Next Best SPAC

I have no inside knowledge of a potential stock listing of the popular anti-Whatsapp messaging app, Telegram. But I know this much, judging by most people I talk to, especially crypto investors, if Telegram ever went public, people would gobble it up. I know I would. I’m waiting for it. So is Sergei Sergienko, who claims he owns $800,000 of Telegram’s pre-initial coin offering (ICO) tokens. “If Telegram does a SPAC IPO, there would be demand for this issue. It would probably outstrip the interest we saw during the ICO. Why? Because as of right now Telegram looks like a liberal application that can accept anyone - right after WhatsApp and others have turn on the censorship,” he says.

A Telegram spokesman declined to comment on the bond issue or the amount of the debt the company has due. The spokesman said Telegram’s equipment and bandwidth costs are growing because it has consistently posted more than 40% year-to-year growth in users.

Python Academy from ar


Telegram Python Academy
FROM USA