From 08fcf4898dec850d7626ab3aff6399629444e0f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Couchet?= Date: Mon, 8 Nov 2021 09:37:23 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20d'une=20fonction=20pour=20retirer=20les?= =?UTF-8?q?=20microsecondes=20d'une=20dur=C3=A9e.=20Pour=20les=20flux=20RS?= =?UTF-8?q?S,=20la=20sp=C3=A9cification=20indique=20que=20le=20format=20do?= =?UTF-8?q?it=20=C3=AAtre=20hh:mm:ss.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libreavous_fonctions.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libreavous_fonctions.php b/libreavous_fonctions.php index 99eca40..fae9998 100644 --- a/libreavous_fonctions.php +++ b/libreavous_fonctions.php @@ -63,6 +63,14 @@ function libreavous_duree_podcast($start,$end) { return $duree; } +// retirer les microseconds d'une durée +function libreavous_remove_microseconds ($duration) { + + $durationobject = new DateTime($duration); + $newduration = $durationobject->format('H:i:s'); + + return $newduration; +} // retirer l'heure si 0 h dans la duree function libreavous_sanszeroh($chaine) { $chaine = str_replace('0 h ','',$chaine);