Pour compter les jours avant un certain événement. C'est super utile.. je crois
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

25 lines
578 B

  1. from datetime import date
  2. from config import date_dest, evenement
  3. from get_date import get_date
  4. from calcul import calcul
  5. def main():
  6. print("Twitter-DayCounter")
  7. today = date.today()
  8. dest = get_date(date_dest)
  9. temps = calcul(today, dest)
  10. if temps == 0 :
  11. print("IT'S TIME !")
  12. else :
  13. message = "Il reste " + str(temps) + " jours, avant " + evenement
  14. print(message)
  15. if __name__ == '__main__':
  16. try :
  17. main()
  18. except KeyboardInterrupt :
  19. print("Fermeture du programme...")