1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-25 08:20:30 +02:00

Amélioration des fichiers d'ajout de tournoi

This commit is contained in:
galaxyoyo
2019-09-07 18:08:40 +02:00
parent 0f0c082437
commit 8606ae7b95
8 changed files with 129 additions and 93 deletions

View File

@ -12,6 +12,6 @@ function formatDate($date = NULL, $with_time = false) {
return strftime("%d %B %G" . ($with_time ? " %H:%M" : ""), strtotime($date));
}
function dateWellFormed($date, $format = "yyyy-mm-dd") {
return date_parse_from_format($format, $date) !== false;
function dateWellFormed($date, $with_time = false) {
return date_parse_from_format($with_time ? "yyyy-mm-dd HH-MM:ss" : "yy-mm-dd", $date) !== false;
}