Skip to content

Commit

Permalink
Remove useless 'His' from date() format
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG committed Jul 11, 2016
1 parent 8340533 commit 3e62f89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/calendrier.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function addon_calendrier() {
if ( isset($_GET['d']) and preg_match('#^\d{4}(/\d{2}){5}#', $_GET['d'])) {
$id = substr(str_replace('/', '', $_GET['d']), 0, 14);
$date = substr(get_entry($GLOBALS['db_handle'], 'articles', 'bt_date', $id, 'return'), 0, 8);
$date = ($date <= date('YmdHis')) ? $date : date('Ym');
$date = ($date <= date('Ymd')) ? $date : date('Ym');
} elseif ( isset($_GET['d']) and preg_match('#^\d{4}/\d{2}(/\d{2})?#', $_GET['d']) ) {
$date = str_replace('/', '', $_GET['d']);
$date = (preg_match('#^\d{6}\d{2}#', $date)) ? substr($date, 0, 8) : substr($date, 0, 6); // avec jour ?
Expand Down

0 comments on commit 3e62f89

Please sign in to comment.