Changeset 6662 for trunk/include/functions_notification.inc.php
- Timestamp:
- Jul 5, 2010, 10:46:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_notification.inc.php
r6652 r6662 609 609 610 610 /** 611 * explodes a MySQL datetime format (2005-07-14 23:01:37) in fields "year",612 * "month", "day", "hour", "minute", "second".613 *614 * @param string mysql datetime format615 * @return array616 */617 function explode_mysqldt($mysqldt)618 {619 $date = array();620 list($date['year'],621 $date['month'],622 $date['day'],623 $date['hour'],624 $date['minute'],625 $date['second'])626 = preg_split('/[-: ]/', $mysqldt);627 628 return $date;629 }630 631 /**632 611 * returns title about recently published elements grouped by post date 633 612 * @param $date_detail: selected date computed by get_recent_post_dates function … … 638 617 639 618 $date = $date_detail['date_available']; 640 $exploded_date = explode_mysqldt($date);619 $exploded_date = strptime($date, '%Y-%m-%d %H:%M:%S'); 641 620 642 621 $title = l10n_dec('%d new image', '%d new images', $date_detail['nb_elements']); 643 $title .= ' ('.$lang['month'][(int)$exploded_date[' month']].' '.$exploded_date['day'].')';622 $title .= ' ('.$lang['month'][(int)$exploded_date['tm_mon']].' '.$exploded_date['tm_mday'].')'; 644 623 645 624 return $title;
Note: See TracChangeset
for help on using the changeset viewer.