Skip to content

Instantly share code, notes, and snippets.

View Leboubou111's full-sized avatar

David C. Leboubou111

  • France - Paris
View GitHub Profile
<?php
$event_start_date_formated = DateTime::createFromFormat('d/m/Y H:i', '18/11/2020 19:15');
if ($event_start_date_formated->format('d/m/Y') == date('d/m/Y', strtotime('yesterday'))) {
$show_event_start_date = 'Demain à '.strftime("%kh%M", strtotime($event_start_date_formated->format('H:i')));
<script type="text/javascript">
console.log('Jour = 1');
</script>
} else if ($event_start_date_formated->format('d/m/Y') == date('d/m/Y')) {
$dif_time = strtotime($event_start_date_formated->format('d/m/Y H:i')) - strtotime(date('d/m/Y H:i'));
$time_to_show = $event_start_date_formated->format('d/m/Y H:i');
#!/usr/bin/env php
<?php
/**
* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.