Diff
418
735
735
datetime.php
  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: datetime.php 418 2006-01-28 12:46:34Z hpdl $ |
| |
| 3 | + | $Id: datetime.php 735 2006-08-21 14:28:40Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
|
|
 |
… |
|
15 | 15 | | return date('Y-m-d H:i:s'); |
| |
16 | 16 | | } |
| |
17 | 17 | | |
  |
18 | | - | function getShort($date = '') { |
| |
| 18 | + | function getShort($date = null, $with_time = false) { |
|
19 | 19 | | global $osC_Language; |
| |
20 | 20 | | |
| |
21 | 21 | | if (empty($date)) { |
| |
|
|
 |
… |
|
30 | 30 | | $second = (int)substr($date, 17, 2); |
| |
31 | 31 | | |
| |
32 | 32 | | if (@date('Y', mktime($hour, $minute, $second, $month, $day, $year)) == $year) { |
  |
33 | | - | return strftime($osC_Language->getDateFormatShort(), mktime($hour, $minute, $second, $month, $day, $year)); |
| |
| 33 | + | return strftime($osC_Language->getDateFormatShort($with_time), mktime($hour, $minute, $second, $month, $day, $year)); |
|
34 | 34 | | } else { |
  |
35 | | - | return ereg_replace('2037', $year, strftime($osC_Language->getDateFormatShort(), mktime($hour, $minute, $second, $month, $day, 2037))); |
| |
| 35 | + | return ereg_replace('2037', $year, strftime($osC_Language->getDateFormatShort($with_time), mktime($hour, $minute, $second, $month, $day, 2037))); |
  |
36 | 36 | | } |
| |
37 | 37 | | } |
| |
38 | 38 | | |
|