X-Git-Url: https://git.immae.eu/?p=perso%2FDenise%2Foms.git;a=blobdiff_plain;f=gestion_donnees.py;h=2177fc8ae9e3f8c3f26b375c40aab5ae84860d78;hp=2ba945df04aed47c62d15bda6d4c6c33362b2825;hb=d38793f9260c1ca8b96a049d04cc801413c8fb0e;hpb=5679dfd03c9761283e3a36d6d09798aaa334e1e9 diff --git a/gestion_donnees.py b/gestion_donnees.py index 2ba945d..2177fc8 100644 --- a/gestion_donnees.py +++ b/gestion_donnees.py @@ -51,9 +51,9 @@ def convertit_age_vers_texte(nombre): """ convertit un nombre de jours en un truc plus lisible en mois, années, jours et renvoie une chaîne sous la forme 3a2m1j par exemple""" annees = int(nombre / jours_dans_annee) - restant = nombre - int(annees*jours_dans_annee) + restant = nombre - round(annees*jours_dans_annee) mois = int(restant/jours_dans_mois) - jours= restant - int(mois*jours_dans_mois) + jours= restant - round(mois*jours_dans_mois) chaine = "" if annees >0: