Skip to content

Instantly share code, notes, and snippets.

@joaocsousa
Created December 14, 2019 13:54
Show Gist options
  • Save joaocsousa/076bc05ee24bd289c9d3ade4142d82a4 to your computer and use it in GitHub Desktop.
Save joaocsousa/076bc05ee24bd289c9d3ade4142d82a4 to your computer and use it in GitHub Desktop.
Codigo Python que faz contagem decrescente para o ano novo
import datetime
import time
ano = datetime.date.today().year
proxinoAno = ano + 1
while (True):
agora = datetime.datetime.now()
primeiroDiaProximoAno = datetime.datetime(proxinoAno, 1, 1, 0, 0, 0)
tempoAteProximoAno = primeiroDiaProximoAno - agora
print(tempoAteProximoAno)
time.sleep(1)
@MuriEdu
Copy link

MuriEdu commented Dec 14, 2019

👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment