Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 689 lines (631 sloc) 22.128 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689
<?php
/**
* Time Helper class file.
*
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake
* @subpackage cake.cake.libs.view.helpers
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* Time Helper class for easy use of time data.
*
* Manipulation of time data.
*
* @package cake
* @subpackage cake.cake.libs.view.helpers
*/
class TimeHelper extends AppHelper {

/**
* Converts a string representing the format for the function strftime and returns a
* windows safe and i18n aware format.
*
* @param string $format Format with specifiers for strftime function. Accepts the special specifier %S which mimics th modifier S for date()
* @param string UNIX timestamp
* @return string windows safe and date() function compatible format for strftime
*/
function convertSpecifiers($format, $time = null) {
if (!$time) {
$time = time();
}
$this->__time = $time;
return preg_replace_callback('/\%(\w+)/',array($this,'__translateSpecifier'),$format);
}

/**
* Auxiliary function to translate a matched specifier element from a regular expresion into
* a windows safe and i18n aware specifier
*
* @param array $specifier match from regular expression
* @return string converted element
*/
function __translateSpecifier($specifier) {
switch ($specifier[1]) {
case 'a':
$abday = __c('abday',5,true);
if (is_array($abday)) {
return $abday[date('w',$this->__time)];
}
break;
case 'A':
$day = __c('day',5,true);
if (is_array($day)) {
return $day[date('w',$this->__time)];
}
break;
case 'c':
$format = __c('d_t_fmt',5,true);
if ($format != 'd_t_fmt') {
return $this->convertSpecifiers($format,$this->__time);
}
break;
case 'C':
return sprintf("%02d", date('Y', $this->__time) / 100);
case 'D':
return '%m/%d/%y';
case 'eS' :
return date('jS',$this->__time);
case 'b':
case 'h':
$months = __c('abmon',5,true);
if (is_array($months)) {
return $months[date('n',$this->__time) -1];
}
return '%b';
case 'B':
$months = __c('mon',5,true);
if (is_array($months)) {
return $months[date('n',$this->__time) -1];
}
break;
case 'n':
return "\n";
case 'p':
case 'P':
$default = array('am' => 0, 'pm' => 1);
$meridiem = $default[date('a',$this->__time)];
$format = __c('am_pm',5,true);
if (is_array($format)) {
$meridiem = $format[$meridiem];
return ($specifier[1] == 'P') ? strtolower($meridiem) : strtoupper($meridiem);
}
break;
case 'r':
$complete = __c('t_fmt_ampm',5,true);
if ($complete != 't_fmt_ampm') {
return str_replace('%p',$this->__translateSpecifier(array('%p','p')),$complete);
}
break;
case 'R':
return date('H:i', $this->__time);
case 't':
return "\t";
case 'T':
return '%H:%M:%S';
case 'u':
return ($weekDay = date('w', $this->__time)) ? $weekDay : 7;
case 'x':
$format = __c('d_fmt',5,true);
if ($format != 'd_fmt') {
return $this->convertSpecifiers($format,$this->__time);
}
break;
case 'X':
$format = __c('t_fmt',5,true);
if ($format != 't_fmt') {
return $this->convertSpecifiers($format,$this->__time);
}
break;
}
return $specifier[0];
}

/**
* Converts given time (in server's time zone) to user's local time, given his/her offset from GMT.
*
* @param string $serverTime UNIX timestamp
* @param int $userOffset User's offset from GMT (in hours)
* @return string UNIX timestamp
*/
function convert($serverTime, $userOffset) {
$serverOffset = $this->serverOffset();
$gmtTime = $serverTime - $serverOffset;
$userTime = $gmtTime + $userOffset * (60*60);
return $userTime;
}

/**
* Returns server's offset from GMT in seconds.
*
* @return int Offset
*/
function serverOffset() {
return date('Z', time());
}

/**
* Returns a UNIX timestamp, given either a UNIX timestamp or a valid strtotime() date string.
*
* @param string $dateString Datetime string
* @param int $userOffset User's offset from GMT (in hours)
* @return string Parsed timestamp
*/
function fromString($dateString, $userOffset = null) {
if (empty($dateString)) {
return false;
}
if (is_integer($dateString) || is_numeric($dateString)) {
$date = intval($dateString);
} else {
$date = strtotime($dateString);
}
if ($userOffset !== null) {
return $this->convert($date, $userOffset);
}
return $date;
}

/**
* Returns a nicely formatted date string for given Datetime string.
*
* @param string $dateString Datetime string or Unix timestamp
* @param int $userOffset User's offset from GMT (in hours)
* @return string Formatted date string
*/
function nice($dateString = null, $userOffset = null) {
if ($dateString != null) {
$date = $this->fromString($dateString, $userOffset);
} else {
$date = time();
}
$format = $this->convertSpecifiers('%a, %b %eS %Y, %H:%M',$date);
$ret = strftime($format, $date);
return $this->output($ret);
}

/**
* Returns a formatted descriptive date string for given datetime string.
*
* If the given date is today, the returned string could be "Today, 16:54".
* If the given date was yesterday, the returned string could be "Yesterday, 16:54".
* If $dateString's year is the current year, the returned string does not
* include mention of the year.
*
* @param string $dateString Datetime string or Unix timestamp
* @param int $userOffset User's offset from GMT (in hours)
* @return string Described, relative date string
*/
function niceShort($dateString = null, $userOffset = null) {
$date = $dateString ? $this->fromString($dateString, $userOffset) : time();

$y = $this->isThisYear($date) ? '' : ' %Y';

if ($this->isToday($date)) {
$ret = sprintf(__('Today, %s',true), strftime("%H:%M", $date));
} elseif ($this->wasYesterday($date)) {
$ret = sprintf(__('Yesterday, %s',true), strftime("%H:%M", $date));
} else {
$format = $this->convertSpecifiers("%b %eS{$y}, %H:%M",$date);
$ret = strftime($format, $date);
}

return $this->output($ret);
}

/**
* Returns a partial SQL string to search for all records between two dates.
*
* @param string $dateString Datetime string or Unix timestamp
* @param string $end Datetime string or Unix timestamp
* @param string $fieldName Name of database field to compare with
* @param int $userOffset User's offset from GMT (in hours)
* @return string Partial SQL string.
*/
function daysAsSql($begin, $end, $fieldName, $userOffset = null) {
$begin = $this->fromString($begin, $userOffset);
$end = $this->fromString($end, $userOffset);
$begin = date('Y-m-d', $begin) . ' 00:00:00';
$end = date('Y-m-d', $end) . ' 23:59:59';

$ret ="($fieldName >= '$begin') AND ($fieldName <= '$end')";
return $this->output($ret);
}

/**
* Returns a partial SQL string to search for all records between two times
* occurring on the same day.
*
* @param string $dateString Datetime string or Unix timestamp
* @param string $fieldName Name of database field to compare with
* @param int $userOffset User's offset from GMT (in hours)
* @return string Partial SQL string.
*/
function dayAsSql($dateString, $fieldName, $userOffset = null) {
$date = $this->fromString($dateString, $userOffset);
$ret = $this->daysAsSql($dateString, $dateString, $fieldName);
return $this->output($ret);
}

/**
* Returns true if given datetime string is today.
*
* @param string $dateString Datetime string or Unix timestamp
* @param int $userOffset User's offset from GMT (in hours)
* @return boolean True if datetime string is today
*/
function isToday($dateString, $userOffset = null) {
$date = $this->fromString($dateString, $userOffset);
return date('Y-m-d', $date) == date('Y-m-d', time());
}

/**
* Returns true if given datetime string is within this week
* @param string $dateString
* @param int $userOffset User's offset from GMT (in hours)
* @return boolean True if datetime string is within current week
*/
function isThisWeek($dateString, $userOffset = null) {
$date = $this->fromString($dateString, $userOffset);
return date('W Y', $date) == date('W Y', time());
}

/**
* Returns true if given datetime string is within this month
* @param string $dateString
* @param int $userOffset User's offset from GMT (in hours)
* @return boolean True if datetime string is within current month
*/
function isThisMonth($dateString, $userOffset = null) {
$date = $this->fromString($dateString);
return date('m Y',$date) == date('m Y', time());
}

/**
* Returns true if given datetime string is within current year.
*
* @param string $dateString Datetime string or Unix timestamp
* @return boolean True if datetime string is within current year
*/
function isThisYear($dateString, $userOffset = null) {
$date = $this->fromString($dateString, $userOffset);
return date('Y', $date) == date('Y', time());
}

/**
* Returns true if given datetime string was yesterday.
*
* @param string $dateString Datetime string or Unix timestamp
* @param int $userOffset User's offset from GMT (in hours)
* @return boolean True if datetime string was yesterday
*/
function wasYesterday($dateString, $userOffset = null) {
$date = $this->fromString($dateString, $userOffset);
return date('Y-m-d', $date) == date('Y-m-d', strtotime('yesterday'));
}

/**
* Returns true if given datetime string is tomorrow.
*
* @param string $dateString Datetime string or Unix timestamp
* @param int $userOffset User's offset from GMT (in hours)
* @return boolean True if datetime string was yesterday
*/
function isTomorrow($dateString, $userOffset = null) {
$date = $this->fromString($dateString, $userOffset);
return date('Y-m-d', $date) == date('Y-m-d', strtotime('tomorrow'));
}

/**
* Returns the quart
* @param string $dateString
* @param boolean $range if true returns a range in Y-m-d format
* @return boolean True if datetime string is within current week
*/
function toQuarter($dateString, $range = false) {
$time = $this->fromString($dateString);
$date = ceil(date('m', $time) / 3);

if ($range === true) {
$range = 'Y-m-d';
}

if ($range !== false) {
$year = date('Y', $time);

switch ($date) {
case 1:
$date = array($year.'-01-01', $year.'-03-31');
break;
case 2:
$date = array($year.'-04-01', $year.'-06-30');
break;
case 3:
$date = array($year.'-07-01', $year.'-09-30');
break;
case 4:
$date = array($year.'-10-01', $year.'-12-31');
break;
}
}
return $this->output($date);
}

/**
* Returns a UNIX timestamp from a textual datetime description. Wrapper for PHP function strtotime().
*
* @param string $dateString Datetime string to be represented as a Unix timestamp
* @param int $userOffset User's offset from GMT (in hours)
* @return integer Unix timestamp
*/
function toUnix($dateString, $userOffset = null) {
$ret = $this->fromString($dateString, $userOffset);
return $this->output($ret);
}

/**
* Returns a date formatted for Atom RSS feeds.
*
* @param string $dateString Datetime string or Unix timestamp
* @param int $userOffset User's offset from GMT (in hours)
* @return string Formatted date string
*/
function toAtom($dateString, $userOffset = null) {
$date = $this->fromString($dateString, $userOffset);
$ret = date('Y-m-d\TH:i:s\Z', $date);
return $this->output($ret);
}

/**
* Formats date for RSS feeds
*
* @param string $dateString Datetime string or Unix timestamp
* @param int $userOffset User's offset from GMT (in hours)
* @return string Formatted date string
*/
function toRSS($dateString, $userOffset = null) {
$date = $this->fromString($dateString, $userOffset);
$ret = date("r", $date);
return $this->output($ret);
}

/**
* Returns either a relative date or a formatted date depending
* on the difference between the current time and given datetime.
* $datetime should be in a <i>strtotime</i> - parsable format, like MySQL's datetime datatype.
*
* Options:
*
* - 'format' => a fall back format if the relative time is longer than the duration specified by end
* - 'end' => The end of relative time telling
* - 'userOffset' => Users offset from GMT (in hours)
*
* Relative dates look something like this:
* 3 weeks, 4 days ago
* 15 seconds ago
*
* Default date formatting is d/m/yy e.g: on 18/2/09
*
* The returned string includes 'ago' or 'on' and assumes you'll properly add a word
* like 'Posted ' before the function output.
*
* @param string $dateString Datetime string or Unix timestamp
* @param array $options Default format if timestamp is used in $dateString
* @return string Relative time string.
*/
function timeAgoInWords($dateTime, $options = array()) {
$userOffset = null;
if (is_array($options) && isset($options['userOffset'])) {
$userOffset = $options['userOffset'];
}
$now = time();
if (!is_null($userOffset)) {
$now = $this->convert(time(), $userOffset);
}
$inSeconds = $this->fromString($dateTime, $userOffset);
$backwards = ($inSeconds > $now);

$format = 'j/n/y';
$end = '+1 month';

if (is_array($options)) {
if (isset($options['format'])) {
$format = $options['format'];
unset($options['format']);
}
if (isset($options['end'])) {
$end = $options['end'];
unset($options['end']);
}
} else {
$format = $options;
}

if ($backwards) {
$futureTime = $inSeconds;
$pastTime = $now;
} else {
$futureTime = $now;
$pastTime = $inSeconds;
}
$diff = $futureTime - $pastTime;

// If more than a week, then take into account the length of months
if ($diff >= 604800) {
$current = array();
$date = array();

list($future['H'], $future['i'], $future['s'], $future['d'], $future['m'], $future['Y']) = explode('/', date('H/i/s/d/m/Y', $futureTime));

list($past['H'], $past['i'], $past['s'], $past['d'], $past['m'], $past['Y']) = explode('/', date('H/i/s/d/m/Y', $pastTime));
$years = $months = $weeks = $days = $hours = $minutes = $seconds = 0;

if ($future['Y'] == $past['Y'] && $future['m'] == $past['m']) {
$months = 0;
$years = 0;
} else {
if ($future['Y'] == $past['Y']) {
$months = $future['m'] - $past['m'];
} else {
$years = $future['Y'] - $past['Y'];
$months = $future['m'] + ((12 * $years) - $past['m']);

if ($months >= 12) {
$years = floor($months / 12);
$months = $months - ($years * 12);
}

if ($future['m'] < $past['m'] && $future['Y'] - $past['Y'] == 1) {
$years --;
}
}
}

if ($future['d'] >= $past['d']) {
$days = $future['d'] - $past['d'];
} else {
$daysInPastMonth = date('t', $pastTime);
$daysInFutureMonth = date('t', mktime(0, 0, 0, $future['m'] - 1, 1, $future['Y']));

if (!$backwards) {
$days = ($daysInPastMonth - $past['d']) + $future['d'];
} else {
$days = ($daysInFutureMonth - $past['d']) + $future['d'];
}

if ($future['m'] != $past['m']) {
$months --;
}
}

if ($months == 0 && $years >= 1 && $diff < ($years * 31536000)) {
$months = 11;
$years --;
}

if ($months >= 12) {
$years = $years + 1;
$months = $months - 12;
}

if ($days >= 7) {
$weeks = floor($days / 7);
$days = $days - ($weeks * 7);
}
} else {
$years = $months = $weeks = 0;
$days = floor($diff / 86400);

$diff = $diff - ($days * 86400);

$hours = floor($diff / 3600);
$diff = $diff - ($hours * 3600);

$minutes = floor($diff / 60);
$diff = $diff - ($minutes * 60);
$seconds = $diff;
}
$relativeDate = '';
$diff = $futureTime - $pastTime;

if ($diff > abs($now - $this->fromString($end))) {
$relativeDate = sprintf(__('on %s',true), date($format, $inSeconds));
} else {
if ($years > 0) {
// years and months and days
$relativeDate .= ($relativeDate ? ', ' : '') . $years . ' ' . __n('year', 'years', $years, true);
$relativeDate .= $months > 0 ? ($relativeDate ? ', ' : '') . $months . ' ' . __n('month', 'months', $months, true) : '';
$relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . $weeks . ' ' . __n('week', 'weeks', $weeks, true) : '';
$relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days, true) : '';
} elseif (abs($months) > 0) {
// months, weeks and days
$relativeDate .= ($relativeDate ? ', ' : '') . $months . ' ' . __n('month', 'months', $months, true);
$relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . $weeks . ' ' . __n('week', 'weeks', $weeks, true) : '';
$relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days, true) : '';
} elseif (abs($weeks) > 0) {
// weeks and days
$relativeDate .= ($relativeDate ? ', ' : '') . $weeks . ' ' . __n('week', 'weeks', $weeks, true);
$relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days, true) : '';
} elseif (abs($days) > 0) {
// days and hours
$relativeDate .= ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days, true);
$relativeDate .= $hours > 0 ? ($relativeDate ? ', ' : '') . $hours . ' ' . __n('hour', 'hours', $hours, true) : '';
} elseif (abs($hours) > 0) {
// hours and minutes
$relativeDate .= ($relativeDate ? ', ' : '') . $hours . ' ' . __n('hour', 'hours', $hours, true);
$relativeDate .= $minutes > 0 ? ($relativeDate ? ', ' : '') . $minutes . ' ' . __n('minute', 'minutes', $minutes, true) : '';
} elseif (abs($minutes) > 0) {
// minutes only
$relativeDate .= ($relativeDate ? ', ' : '') . $minutes . ' ' . __n('minute', 'minutes', $minutes, true);
} else {
// seconds only
$relativeDate .= ($relativeDate ? ', ' : '') . $seconds . ' ' . __n('second', 'seconds', $seconds, true);
}

if (!$backwards) {
$relativeDate = sprintf(__('%s ago', true), $relativeDate);
}
}
return $this->output($relativeDate);
}

/**
* Alias for timeAgoInWords
*
* @param mixed $dateTime Datetime string (strtotime-compatible) or Unix timestamp
* @param mixed $options Default format string, if timestamp is used in $dateTime, or an array of options to be passed
* on to timeAgoInWords().
* @return string Relative time string.
* @see TimeHelper::timeAgoInWords
*/
function relativeTime($dateTime, $options = array()) {
return $this->timeAgoInWords($dateTime, $options);
}

/**
* Returns true if specified datetime was within the interval specified, else false.
*
* @param mixed $timeInterval the numeric value with space then time type. Example of valid types: 6 hours, 2 days, 1 minute.
* @param mixed $dateString the datestring or unix timestamp to compare
* @param int $userOffset User's offset from GMT (in hours)
* @return bool
*/
function wasWithinLast($timeInterval, $dateString, $userOffset = null) {
$tmp = str_replace(' ', '', $timeInterval);
if (is_numeric($tmp)) {
$timeInterval = $tmp . ' ' . __('days', true);
}

$date = $this->fromString($dateString, $userOffset);
$interval = $this->fromString('-'.$timeInterval);

if ($date >= $interval && $date <= time()) {
return true;
}

return false;
}

/**
* Returns gmt, given either a UNIX timestamp or a valid strtotime() date string.
*
* @param string $dateString Datetime string
* @return string Formatted date string
*/
function gmt($string = null) {
if ($string != null) {
$string = $this->fromString($string);
} else {
$string = time();
}
$string = $this->fromString($string);
$hour = intval(date("G", $string));
$minute = intval(date("i", $string));
$second = intval(date("s", $string));
$month = intval(date("n", $string));
$day = intval(date("j", $string));
$year = intval(date("Y", $string));

$return = gmmktime($hour, $minute, $second, $month, $day, $year);
return $return;
}

/**
* Returns a formatted date string, given either a UNIX timestamp or a valid strtotime() date string.
*
* @param string $format date format string.
* @param string $dateString Datetime string
* @param boolean $invalid flag to ignore results of fromString == false
* @param int $userOffset User's offset from GMT (in hours)
* @return string Formatted date string
*/
function format($format, $date = null, $invalid = false, $userOffset = null) {
$time = $this->fromString($date, $userOffset);
$_time = $this->fromString($format, $userOffset);

if (is_numeric($_time) && $time === false) {
$format = $date;
return $this->i18nFormat($_time,$format,$invalid,$userOffset);
}
if ($time === false && $invalid !== false) {
return $invalid;
}
return date($format, $time);
}

/**
* Returns a formatted date string, given either a UNIX timestamp or a valid strtotime() date string.
* It take in account the default date format for the current language if a LC_TIME file is used.
* You must set the correct locale using setlocale() in order to translate day and month names
* @param string $dateString Datetime string
* @param string $format strftime format string.
* @param boolean $invalid flag to ignore results of fromString == false
* @param int $userOffset User's offset from GMT (in hours)
* @return string Formatted and translated date string
*/
function i18nFormat($date, $format = null, $invalid = false, $userOffset = null) {
$date = $this->fromString($date, $userOffset);
if ($date === false && $invalid !== false) {
return $invalid;
}
if (empty($format)) {
$format = '%x';
}
$format = $this->convertSpecifiers($format,$date);
return strftime($format,$date);
}
}
?>
Something went wrong with that request. Please try again.