public static function getForecast() { $result = array(); foreach (self::_getClass()->weather_forecast as $day) { $result[] = array('day' => qtrans_strftime('%a', strtotime((string) $day->attributes()->date)), 'low' => (string) $day->attributes()->low, 'high' => (string) $day->attributes()->high, 'icon' => self::getIconClass((int) $day->attributes()->code)); } return $result; }
function qtrans_timeFromCommentForCurrentLanguage($old_date, $format = '', $gmt = false) { global $comment; $comment_date = $gmt ? $comment->comment_date_gmt : $comment->comment_date; return qtrans_strftime(qtrans_convertTimeFormat($format), mysql2date('U', $comment_date), $old_date); }
function qtrans_formatPostModifiedDateTime($format) { global $post; return qtrans_strftime(qtrans_convertFormat($format, $format), mysql2date('U', $post->post_modified), '', $before, $after); }
/** * If time change is more then 6 hours ago, returns formatted date. * Elsewise return time-difference * @param integer $time1 * @return string */ function fruitframe_custom_time_diff($t) { return strtolower(qtrans_strftime('%e %B', $t)); }
function qtrans_timeFromCommentForCurrentLanguage($old_date, $format = '', $gmt = false, $translate = true) { if (!$translate) { return $old_date; } global $comment, $q_config; $comment_date = $gmt ? $comment->comment_date_gmt : $comment->comment_date; $ts = mysql2date('U', $comment_date); if ($format == 'U') { return $ts; } $format = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($format); if (!empty($format) && $q_config['use_strftime'] == QT_STRFTIME) { $format = qtrans_convertDateFormatToStrftimeFormat($format); } return qtrans_strftime(qtrans_convertTimeFormat($format), $ts, $old_date); }
private static function format_time($start_time, $language, $format) { global $q_config; if (function_exists('qtrans_convertTimeFormat')) { // time format from qTranslate $format = $q_config['time_format'][$language]; return qtrans_strftime($format, strtotime($start_time)); } elseif (function_exists('ppqtrans_convertTimeFormat')) { //and qTranslate Plus $format = $q_config['time_format'][$language]; return ppqtrans_strftime($format, strtotime($start_time)); } return date($format, strtotime($start_time)); }