• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP localizeDate函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中localizeDate函数的典型用法代码示例。如果您正苦于以下问题:PHP localizeDate函数的具体用法?PHP localizeDate怎么用?PHP localizeDate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了localizeDate函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: list_weeks

function list_weeks()
{
    global $getdate, $this_year, $cal, $dateFormat_week_jump, $week_start_day;
    ereg("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2);
    $this_day = $day_array2[3];
    $this_month = $day_array2[2];
    $this_year = $day_array2[1];
    $check_week = strtotime($getdate);
    $start_week_time = strtotime(dateOfWeek(date("Ymd", strtotime("{$this_year}-01-01")), $week_start_day));
    $end_week_time = $start_week_time + 6 * 25 * 60 * 60;
    do {
        $weekdate = date("Ymd", $start_week_time);
        $select_week1 = localizeDate($dateFormat_week_jump, $start_week_time);
        $select_week2 = localizeDate($dateFormat_week_jump, $end_week_time);
        if ($check_week >= $start_week_time && $check_week <= $end_week_time) {
            $return .= "<option value=\"week.php?cal={$cal}&amp;getdate={$weekdate}\" selected=\"selected\">{$select_week1} - {$select_week2}</option>\n";
        } else {
            $return .= "<option value=\"week.php?cal={$cal}&amp;getdate={$weekdate}\">{$select_week1} - {$select_week2}</option>\n";
        }
        $start_week_time = strtotime("+1 week", $start_week_time);
        $end_week_time = $start_week_time + 6 * 25 * 60 * 60;
    } while (date("Y", $start_week_time) <= $this_year);
    return $return;
}
开发者ID:mediasadc,项目名称:alba,代码行数:24,代码来源:list_functions.php


示例2: makeTitle

function makeTitle($arr, $time)
{
    global $timeFormat, $dateFormat_week;
    $event_text = chopToWordCount(sanitizeForWeb(urldecode($arr["event_text"])), 20);
    if ($time == -1) {
        $start = localizeDate($dateFormat_week, $arr['start_unixtime']);
        $end = localizeDate($dateFormat_week, $arr['end_unixtime'] - 60);
        $title = $event_text;
        if ($start != $end) {
            $title .= "\n{$start} - {$end}";
        }
    } else {
        $start = date($timeFormat, $arr['start_unixtime']);
        $end = date($timeFormat, $arr['end_unixtime']);
        $title = "{$start}: {$event_text}";
        if ($start != $end) {
            $title = "{$event_text}\n{$start} - {$end}";
        }
    }
    if (!empty($arr['location'])) {
        $title .= "\nLocation: " . chopToWordCount(sanitizeForWeb(urldecode($arr['location'])), 20);
    }
    if (!empty($arr['description'])) {
        $title .= "\n\n" . chopToWordCount(sanitizeForWeb(urldecode($arr['description'])), 80);
    }
    $title = trim($title);
    return $title;
}
开发者ID:bilsan,项目名称:schedule-generator,代码行数:28,代码来源:date_functions.php


示例3: define

define('BASE', '../');
include_once BASE . 'functions/init.inc.php';
require_once BASE . 'functions/date_functions.php';
require_once BASE . 'functions/template.php';
# information for the popup is sent via $_POST by a javascript snippet in
# in function openevent() from functions/date_functions.php
# character encoding has been problematic with popups.
$event = unserialize(stripslashes($_POST['event_data']));
$organizer = unserialize($event['organizer']);
$attendee = unserialize($event['attendee']);
$uid = stripslashes($_POST['uid']);
// Format event time
// All day
if ($_POST['time'] == -1) {
    $start = localizeDate($dateFormat_week, $event['start_unixtime']);
    $end = localizeDate($dateFormat_week, $event['end_unixtime'] - 60);
    $event_times = $lang['l_all_day'] . " {$start}";
    if ($start != $end) {
        $event_times = "{$start} - {$end}";
    }
} else {
    $start = date($timeFormat, $event['start_unixtime']);
    $end = date($timeFormat, $event['end_unixtime']);
    $event_times = "{$start}";
    if ($start != $end) {
        $event_times = "{$start} - {$end}";
    }
}
$event['event_text'] = sanitizeForWeb(urldecode($event['event_text']));
$event['description'] = sanitizeForWeb(urldecode($event['description']));
$event['location'] = sanitizeForWeb(urldecode($event['location']));
开发者ID:bilsan,项目名称:schedule-generator,代码行数:31,代码来源:event.php


示例4: ereg

<?php

ereg("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2);
$this_day = $day_array2[3];
$this_month = $day_array2[2];
$this_year = $day_array2[1];
$check_week = strtotime($getdate);
$start_week_time = strtotime(dateOfWeek(date("Ymd", strtotime("{$this_year}-01-01")), $week_start_day));
$end_week_time = $start_week_time + 6 * 25 * 60 * 60;
print "<select name=\"action\" class=\"query_style\" onChange=\"window.location=(this.options[this.selectedIndex].value);\">\n";
// build the <option> tags
do {
    $weekdate = date("Ymd", $start_week_time);
    $select_week1 = localizeDate($dateFormat_week_jump, $start_week_time);
    $select_week2 = localizeDate($dateFormat_week_jump, $end_week_time);
    if ($check_week >= $start_week_time && $check_week <= $end_week_time) {
        print "<option value=\"week.php?cal={$cal}&amp;getdate={$weekdate}\" selected>{$select_week1} - {$select_week2}</option>\n";
    } else {
        print "<option value=\"week.php?cal={$cal}&amp;getdate={$weekdate}\">{$select_week1} - {$select_week2}</option>\n";
    }
    $start_week_time = strtotime("+1 week", $start_week_time);
    $end_week_time = $start_week_time + 6 * 25 * 60 * 60;
} while (date("Y", $start_week_time) <= $this_year);
// finish <select>
print "</select>";
开发者ID:dalinhuang,项目名称:sutoj,代码行数:25,代码来源:list_weeks.php


示例5: while

    }
    $thisdate = $thisdate + 25 * 60 * 60;
    $i++;
} while ($i < 7);
?>
										</tr>
										<?php 
// print out the day names here
echo "<tr>";
$thisdate = $start_week_time;
$i = 0;
echo "<td class=\"dateback\" width=\"60\"><img src=\"images/spacer.gif\" width=\"1\" height=\"12\" alt=\" \"></td>";
echo "<td class=\"dateback\" width=\"1\"></td>";
do {
    $thisday = date("Ymd", $thisdate);
    $thisday3 = localizeDate($dateFormat_week_list, $thisdate);
    echo "<td width=\"70\" colspan=\"" . $nbrGridCols[$thisday] . "\" valign=\"top\" align=\"center\" class=\"dateback\">\n";
    echo "<font class=\"V9\"><a class=\"psf\" href=\"day.php?cal={$cal}&amp;getdate={$thisday}\">{$thisday3}</a></font>\n";
    echo "</td>\n";
    $thisdate = $thisdate + 25 * 60 * 60;
    $i++;
} while ($i < 7);
echo "</tr>";
?>
										<tr>
											<td width="60"><img src="images/spacer.gif" width="60" height="1" alt=" "></td>
											<td width="1"></td>
											<?php 
$thisdate = $start_week_time;
$i = 0;
do {
开发者ID:dalinhuang,项目名称:sutoj,代码行数:31,代码来源:week.php


示例6: strtotime

    $minical_view = 'day';
}
$starttime = '0500';
$weekstart = 1;
$unix_time = strtotime($getdate);
$today_today = date('Ymd', strtotime("now + {$second_offset} seconds"));
$tomorrows_date = date('Ymd', strtotime('+1 day', $unix_time));
$yesterdays_date = date('Ymd', strtotime('-1 day', $unix_time));
$display_date = localizeDate($dateFormat_day, $unix_time);
// For the side months
ereg('([0-9]{4})([0-9]{2})([0-9]{2})', $getdate, $day_array2);
$this_day = $day_array2[3];
$this_month = $day_array2[2];
$this_year = $day_array2[1];
$parse_month = date('Ym', $unix_time);
$thisday2 = localizeDate($dateFormat_week_list, $unix_time);
$start_week_time = strtotime(dateOfWeek($getdate, $week_start_day));
$dayborder = 0;
$nbrGridCols = 1;
if (isset($master_array[$getdate])) {
    foreach ($master_array[$getdate] as $ovlKey => $ovlValue) {
        if ($ovlKey != '-1') {
            foreach ($ovlValue as $ovl2Value) {
                $nbrGridCols = kgv($nbrGridCols, $ovl2Value['event_overlap'] + 1);
            }
        }
    }
}
include BASE . 'includes/header.inc.php';
?>
<center>
开发者ID:karl,项目名称:monket-calendar,代码行数:31,代码来源:day.php


示例7: define

<?php

define('BASE', './');
$current_view = 'year';
require_once BASE . 'functions/ical_parser.php';
require_once BASE . 'functions/list_functions.php';
require_once BASE . 'functions/template.php';
ereg("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2);
$this_day = $day_array2[3];
$this_month = $day_array2[2];
$this_year = $day_array2[1];
$next_year = strtotime("+1 year", strtotime($getdate));
$next_year = date("Ymd", $next_year);
$prev_year = strtotime("-1 year", strtotime($getdate));
$prev_year = date("Ymd", $prev_year);
$sidebar_date = localizeDate($dateFormat_week_list, strtotime($getdate));
// For the side months
ereg("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2);
$this_day = $day_array2[3];
$this_month = $day_array2[2];
$this_year = $day_array2[1];
// select for calendars
$available = availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED);
$list_icals = display_ical_list($available);
$list_years = list_years();
$list_months = list_months();
$list_weeks = list_weeks();
$list_jumps = list_jumps();
$list_calcolors = '<img src="templates/' . $template . '/images/allday_dot.gif" alt=" " width="11" height="10" border="0" />' . $lang['l_all_day'] . '<br>
<img src="templates/' . $template . '/images/event_dot.gif" alt=" " width="11" height="10" border="0" />' . $lang['l_event'] . "<br>";
$list_icals_pick = display_ical_list($available, TRUE);
开发者ID:bilsan,项目名称:schedule-generator,代码行数:31,代码来源:year.php


示例8: monthbottom

 function monthbottom()
 {
     global $template, $getdate, $master_array, $this_year, $this_month, $cal, $timeFormat, $timeFormat_small, $dateFormat_week_list, $lang;
     preg_match("!<\\!-- loop showbottomevents_odd on -->(.*)<\\!-- loop showbottomevents_odd off -->!is", $this->page, $match1);
     preg_match("!<\\!-- loop showbottomevents_even on -->(.*)<\\!-- loop showbottomevents_even off -->!is", $this->page, $match2);
     $loop[0] = trim($match1[1]);
     $loop[1] = trim($match2[1]);
     $m_start = $this_year . $this_month . '01';
     $u_start = strtotime($m_start);
     $i = 0;
     do {
         if (isset($master_array[$m_start])) {
             foreach ($master_array[$m_start] as $cal_time => $event_times) {
                 $switch['CAL'] = $cal;
                 $switch['START_DATE'] = localizeDate($dateFormat_week_list, $u_start);
                 foreach ($event_times as $uid => $val) {
                     $switch['CALNAME'] = $val['calname'];
                     if (!isset($val['event_start'])) {
                         $switch['START_TIME'] = $lang['l_all_day'];
                         $switch['EVENT_TEXT'] = openevent($m_start, $cal_time, $uid, $val, $month_event_lines, 15, 'psf');
                         $switch['DESCRIPTION'] = urldecode($val['description']);
                     } else {
                         $event_start = $val['start_unixtime'];
                         $event_end = isset($val['display_end']) ? $val['display_end'] : $val["event_end"];
                         $event_start = date($timeFormat, $val['start_unixtime']);
                         $event_end = date($timeFormat, @strtotime($event_end));
                         $switch['START_TIME'] = $event_start . ' - ' . $event_end;
                         $switch['EVENT_TEXT'] = openevent($m_start, $cal_time, $uid, $val, 0, 15, 'psf');
                         $switch['DESCRIPTION'] = urldecode($val['description']);
                     }
                     if ($switch['EVENT_TEXT'] != '') {
                         $switch['DAYLINK'] = $m_start;
                         $temp = $loop[$i];
                         foreach ($switch as $tag => $data) {
                             $temp = str_replace('{' . $tag . '}', $data, $temp);
                         }
                         $middle .= $temp;
                         $i = $i == 1 ? 0 : 1;
                     }
                 }
             }
         }
         $u_start = strtotime("+1 day", $u_start);
         $m_start = date('Ymd', $u_start);
         $check_month = date('m', $u_start);
         unset($switch);
     } while ($this_month == $check_month);
     $this->page = preg_replace('!<\\!-- loop showbottomevents_odd on -->(.*)<\\!-- loop showbottomevents_even off -->!is', $middle, $this->page);
 }
开发者ID:jbogota,项目名称:blog-king,代码行数:49,代码来源:template.php


示例9: define

define('BASE', './');
$current_view = 'year';
require_once BASE . 'functions/ical_parser.php';
require_once BASE . 'functions/list_functions.php';
require_once BASE . 'functions/template.php';
header("Content-Type: text/html; charset={$charset}");
ereg("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2);
$this_day = $day_array2[3];
$this_month = $day_array2[2];
$this_year = $day_array2[1];
$next_year = strtotime("+1 year", strtotime($getdate));
$next_year = date("Ymd", $next_year);
$prev_year = strtotime("-1 year", strtotime($getdate));
$prev_year = date("Ymd", $prev_year);
$sidebar_date = localizeDate($dateFormat_day, strtotime($getdate));
// For the side months
ereg("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2);
$this_day = $day_array2[3];
$this_month = $day_array2[2];
$this_year = $day_array2[1];
// select for calendars
$list_icals = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED));
$list_years = list_years();
$list_months = list_months();
$list_weeks = list_weeks();
$list_jumps = list_jumps();
$list_calcolors = '<img src="templates/' . $template . '/images/allday_dot.gif" alt=" " width="11" height="10" border="0" />' . $lang['l_all_day'] . '<br>
<img src="templates/' . $template . '/images/event_dot.gif" alt=" " width="11" height="10" border="0" />' . $lang['l_event'] . "<br>";
$list_icals_pick = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED), TRUE);
// login/logout
开发者ID:jbogota,项目名称:blog-king,代码行数:30,代码来源:year.php


示例10: while

        if ($checkagain != $minical_month) {
            $whole_month = FALSE;
        }
    }
} while ($whole_month == TRUE);
?>
			</table>
			<img src="images/spacer.gif" width="1" height="3" alt=" "><br>
		</td>
	</tr>
</table>
<img src="images/spacer.gif" width="1" height="10" alt=" "><br>
<table width="170" border="0" cellpadding="3" cellspacing="0" class="calborder">
	<tr height="20">
		<td align="center" class="sideback"><font class="G10BOLD"><?php 
print localizeDate($dateFormat_month, strtotime("+1 month", strtotime($getdate)));
?>
</font></td>
	</tr>
	<tr>
		<td bgcolor="#FFFFFF" align="center">
			<table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
				<?php 
$start_day = strtotime($week_start_day);
echo '<tr>';
for ($i = 0; $i < 7; $i++) {
    $day_num = date("w", $start_day);
    $day = $daysofweekreallyshort_lang[$day_num];
    echo '<td align="center" class="G10BOLD">' . $day . '</td>';
    $start_day = strtotime("+1 day", $start_day);
}
开发者ID:dalinhuang,项目名称:sutoj,代码行数:31,代码来源:sidebar.php


示例11: date

		<td width="210" valign="top" align="left">
			<table border="0" width="210" cellspacing="0" cellpadding="0" class="calborder">
				<tr>
					<td colspan="7">
						<table border="0" width="210" cellspacing="0" cellpadding="0">
							<tr>
								<td width="1" class="sideback"><img src="images/spacer.gif" width="1" height="20" alt=" "></td>
								<?php 
    $monthlink = date("Ym", $startYear);
    $monthlink = $monthlink . $this_day;
    ?>
								<td align="center" class="sideback"><?php 
    echo '<a class="ps3" href="month.php?cal=' . $cal . '&amp;getdate=' . $monthlink . '">';
    ?>
<font class="G10BOLD"><?php 
    print localizeDate($dateFormat_month, $startYear);
    ?>
</font></a></td>
								<td width="1" class="sideback"></td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
				<?php 
    $start_day = strtotime($week_start_day);
    for ($i = 0; $i < 7; $i++) {
        $day_num = date("w", $start_day);
        $day = $daysofweekshort_lang[$day_num];
        print '<td width="30" height="14" class="dateback" align="center"><font class="V9BOLD">' . $day . '</font></td>' . "\n";
        $start_day = strtotime("+1 day", $start_day);
开发者ID:dalinhuang,项目名称:sutoj,代码行数:31,代码来源:year.php


示例12: elseif

    $week_end = '';
} elseif ($printview == 'week') {
    $start_week = localizeDate($dateFormat_week, $start_week_time);
    $end_week = localizeDate($dateFormat_week, $end_week_time);
    $display_date = "{$start_week} - {$end_week}";
    $week_start = date("Ymd", $start_week_time);
    $week_end = date("Ymd", $end_week_time);
    $next = date("Ymd", strtotime("+1 week", $unix_time));
    $prev = date("Ymd", strtotime("-1 week", $unix_time));
} elseif ($printview == 'month') {
    $display_date = localizeDate($dateFormat_month, strtotime($getdate));
    $next = date("Ymd", strtotime("+1 month", $unix_time));
    $prev = date("Ymd", strtotime("-1 month", $unix_time));
    $week_start = '';
    $week_end = '';
} elseif ($printview == 'year') {
    $display_date = localizeDate($dateFormat_year, strtotime($getdate));
    $next = date("Ymd", strtotime("+1 year", $unix_time));
    $prev = date("Ymd", strtotime("-1 year", $unix_time));
    $week_start = '';
    $week_end = '';
}
require_once BASE . 'functions/ical_parser.php';
require_once BASE . 'functions/list_functions.php';
require_once BASE . 'functions/template.php';
header("Content-Type: text/html; charset={$phpiCal_config->charset}");
$page = new Page(BASE . 'templates/' . $template . '/print.tpl');
$page->replace_files(array('header' => BASE . 'templates/' . $phpiCal_config->template . '/header.tpl', 'footer' => BASE . 'templates/' . $phpiCal_config->template . '/footer.tpl', 'sidebar' => BASE . 'templates/' . $phpiCal_config->template . '/sidebar.tpl'));
$page->replace_tags(array('version' => $phpiCal_config->phpicalendar_version, 'event_js' => '', 'charset' => $phpiCal_config->charset, 'default_path' => $phpiCal_config->default_path, 'default_view' => $phpiCal_config->default_view, 'template' => $phpiCal_config->template, 'cpath' => $phpiCal_config->cpath, 'cal' => $cal, 'getdate' => $getdate, 'calendar_name' => $cal_displayname, 'current_view' => $current_view, 'printview' => $printview, 'display_date' => $display_date, 'sidebar_date' => @$sidebar_date, 'rss_powered' => $rss_powered, 'rss_available' => '', 'rss_valid' => '', 'show_search' => '', 'next_day' => @$next_day, 'prev_day' => @$prev_day, 'show_goto' => '', 'is_logged_in' => '', 'list_icals' => @$list_icals, 'list_years' => @$list_years, 'list_months' => @$list_months, 'list_weeks' => @$list_weeks, 'list_jumps' => @$list_jumps, 'legend' => @$list_calcolors, 'style_select' => @$style_select, 'l_time' => $lang['l_time'], 'l_summary' => $lang['l_summary'], 'l_description' => $lang['l_description'], 'l_calendar' => $lang['l_calendar'], 'l_view_calendars' => $lang['l_view_calendars'], 'l_day' => $lang['l_day'], 'l_week' => $lang['l_week'], 'l_month' => $lang['l_month'], 'l_year' => $lang['l_year'], 'l_location' => $lang['l_location'], 'l_subscribe' => $lang['l_subscribe'], 'l_download' => $lang['l_download'], 'l_no_results' => $lang['l_no_results'], 'l_powered_by' => $lang['l_powered_by'], 'l_this_site_is' => $lang['l_this_site_is']));
$page->draw_print($page);
$page->output();
开发者ID:bilsan,项目名称:schedule-generator,代码行数:31,代码来源:print.php


示例13: fetch_assoc

 function fetch_assoc()
 {
     $row = $this->resultSet->fetch_assoc();
     if (is_array($row) && isset($_SESSION['sessionTimeZone'])) {
         foreach ($row as $key => $value) {
             // check if value matches datetime format.  Convert to local timezone
             if (isDateTime($value)) {
                 $row[$key] = localizeDate($value, $_SESSION['sessionTimeZone']);
             }
         }
     }
     return $row;
 }
开发者ID:gjcchan,项目名称:LAMP-CMS,代码行数:13,代码来源:sqlUtils.php


示例14: define

define('BASE', './');
$current_view = 'day';
require_once BASE . 'functions/ical_parser.php';
require_once BASE . 'functions/list_functions.php';
require_once BASE . 'functions/template.php';
header("Content-Type: text/html; charset={$charset}");
if ($minical_view == 'current') {
    $minical_view = 'day';
}
$weekstart = 1;
$unix_time = strtotime($getdate);
$today_today = date('Ymd', time() + $second_offset);
$next_day = date('Ymd', strtotime("+1 day", $unix_time));
$prev_day = date('Ymd', strtotime("-1 day", $unix_time));
$display_date = localizeDate($dateFormat_day, $unix_time);
$sidebar_date = localizeDate($dateFormat_week_list, $unix_time);
$start_week_time = strtotime(dateOfWeek($getdate, $week_start_day));
// select for calendars
$list_icals = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED));
$list_years = list_years();
$list_months = list_months();
$list_weeks = list_weeks();
$list_jumps = list_jumps();
$list_calcolors = list_calcolors();
$list_icals_pick = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED), TRUE);
// login/logout
$is_logged_in = $username != '' && !$invalid_login ? true : false;
$show_user_login = !$is_logged_in && $allow_login == 'yes';
$login_querys = login_querys();
$logout_querys = logout_querys();
$page = new Page(BASE . 'templates/' . $template . '/day.tpl');
开发者ID:BGCX261,项目名称:zona-cal-svn-to-git,代码行数:31,代码来源:day.php


示例15: icalToArray


//.........这里部分代码省略.........
                                        $freq_type = 'month';
                                        break;
                                    case 'WEEKLY':
                                        $freq_type = 'week';
                                        break;
                                    case 'DAILY':
                                        $freq_type = 'day';
                                        break;
                                    case 'HOURLY':
                                        $freq_type = 'hour';
                                        break;
                                    case 'MINUTELY':
                                        $freq_type = 'minute';
                                        break;
                                    case 'SECONDLY':
                                        $freq_type = 'second';
                                        break;
                                }
                                $master_array[$start_date][$hour . $minute][$uid]['recur'][$key] = strtolower($val);
                                break;
                            case 'COUNT':
                                $count = $val;
                                $master_array[$start_date][$hour . $minute][$uid]['recur'][$key] = $count;
                                break;
                            case 'UNTIL':
                                $until = str_replace('T', '', $val);
                                $until = str_replace('Z', '', $until);
                                if (strlen($until) == 8) {
                                    $until = $until . '235959';
                                }
                                $abs_until = $until;
                                ereg('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})', $until, $regs);
                                $until = mktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]);
                                $master_array[$start_date][$hour . $minute][$uid]['recur'][$key] = localizeDate($dateFormat_week, $until);
                                break;
                            case 'INTERVAL':
                                if ($val > 0) {
                                    $number = $val;
                                    $master_array[$start_date][$hour . $minute][$uid]['recur'][$key] = $number;
                                }
                                break;
                            case 'BYSECOND':
                                $bysecond = $val;
                                $bysecond = split(',', $bysecond);
                                $master_array[$start_date][$hour . $minute][$uid]['recur'][$key] = $bysecond;
                                break;
                            case 'BYMINUTE':
                                $byminute = $val;
                                $byminute = split(',', $byminute);
                                $master_array[$start_date][$hour . $minute][$uid]['recur'][$key] = $byminute;
                                break;
                            case 'BYHOUR':
                                $byhour = $val;
                                $byhour = split(',', $byhour);
                                $master_array[$start_date][$hour . $minute][$uid]['recur'][$key] = $byhour;
                                break;
                            case 'BYDAY':
                                $byday = $val;
                                $byday = split(',', $byday);
                                $master_array[$start_date][$hour . $minute][$uid]['recur'][$key] = $byday;
                                break;
                            case 'BYMONTHDAY':
                                $bymonthday = $val;
                                $bymonthday = split(',', $bymonthday);
                                $master_array[$start_date][$hour . $minute][$uid]['recur'][$key] = $bymonthday;
                                break;
开发者ID:mediasadc,项目名称:alba,代码行数:67,代码来源:ical_parser.php


示例16: localizeDate

									</table>
								</td>
							</tr>
						</table>	
					</td>
				</tr>
			</table>
		</td>
		<td width="1%" valign="top" align="left">
	<table cellpadding="0" cellspacing="0" border="0" width="160">
		<tr>
			<td valign="middle" align="center">
				<table width="160" border="0" cellpadding="3" cellspacing="0">
					<tr>
						<td align="center"><font class="G10BOLD"><?php 
print localizeDate($dateFormat_month, strtotime("+1 month", $fake_getdate_time));
?>
</font></td>
					</tr>
					<tr>
						<td bgcolor="#FFFFFF" align="center">
							<table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
								<?php 
$start_day = strtotime($week_start_day);
echo '<tr>';
for ($i = 0; $i < 7; $i++) {
    $day_num = date("w", $start_day);
    $day = $daysofweekreallyshort_lang[$day_num];
    echo '<td align="center" class="G10BOLD">' . $day . '</td>';
    $start_day = strtotime("+1 day", $start_day);
}
开发者ID:karl,项目名称:monket-calendar,代码行数:31,代码来源:calendar_nav.php


示例17: foreach

				<table border="0" cellspacing="0" cellpadding="0" width="100%">
					<tr>
						<td align="center" valign="top">
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td colspan="3" height="1"></td>
								</tr>
								<?php 
// Iterate the entire master array
foreach ($master_array as $key => $val) {
    // Pull out only this months
    ereg("([0-9]{6})([0-9]{2})", $key, $regs);
    if ($regs[1] == $parse_month && $printview == "month" || $key == $getdate && $printview == "day" || $key >= $week_start && $key <= $week_end && $printview == "week") {
        $events_week++;
        $dayofmonth = strtotime($key);
        $dayofmonth = localizeDate($dateFormat_day, $dayofmonth);
        echo "<tr><td width=\"10\"><img src=\"images/spacer.gif\" width=\"10\" height=\"1\" alt=\" \"></td>\n";
        echo "<td align=\"left\" colspan=\"2\"><font class=\"V12\"><b>{$dayofmonth}</b></font></td></tr>";
        echo "<tr><td colspan=\"3\"><img src=\"images/spacer.gif\" width=\"1\" height=\"5\" alt=\" \"></td></tr>\n";
        // Pull out each day
        foreach ($val as $new_val) {
            // Pull out each time
            foreach ($new_val as $new_key2 => $new_val2) {
                if ($new_val2["event_text"]) {
                    $event_text = stripslashes(urldecode($new_val2["event_text"]));
                    $description = stripslashes(urldecode($new_val2["description"]));
                    $event_start = $new_val2["event_start"];
                    $event_end = $new_val2["event_end"];
                    if (isset($new_val2["display_end"])) {
                        $event_end = $new_val2["display_end"];
                    }
开发者ID:karl,项目名称:monket-calendar,代码行数:31,代码来源:print.php


示例18: round

#$rss .= '<language>'.$rss_language.'</language>'."\n";
//generate the items
$numdays = round((strtotime($todate) - strtotime($fromdate)) / (60 * 60 * 24)) + 1;
$thisdate = $fromdate;
#	start at beginning of date range,
# 	note that usage of $thisdate is different from distribution
# 	I use it as a date, dist uses it as a time
$i = 1;
#day counter
$rss .= "<items>\n<rdf:Seq>\n";
$rss_items = '';
$uid_arr = array();
do {
    $thisdate = date('Ymd', strtotime($thisdate));
    #echo "Date: $thisdate<br>\n";
    $dayofweek = localizeDate("%a %b %e %Y", strtotime($thisdate));
    if (isset($master_array[$thisdate]) && sizeof($master_array[$thisdate]) > 0) {
        foreach ($master_array["{$thisdate}"] as $event_times) {
            foreach ($event_times as $uid => $val) {
                #handle multiday all day events
                if (!$val["event_start"]) {
                    if (isset($uid_arr[$uid])) {
                        $uid_arr[$uid] .= "+{$dayofweek}";
                        continue;
                    } else {
                        $uid_arr[$uid] = "{$dayofweek}";
                    }
                    $event_start = $lang['l_all_day'];
                } else {
                    $event_start = @$val["event_start"];
                    $event_start = date($timeFormat, @strtotime("{$event_start}"));
开发者ID:BGCX261,项目名称:zona-cal-svn-to-git,代码行数:31,代码来源:rss1.0.php


示例19: strtolower

     $master_array[$start_date][$hour . $minute][$uid]['recur'][$key] = strtolower($val);
     break;
 case 'COUNT':
     $count = $val;
     $master_array[$start_date][$hour . $minute][$uid]['recur'][$key] = $count;
     break;
 case 'UNTIL':
     $until = str_replace('T', '', $val);
     $until = str_replace('Z', '', $until);
     if (strlen($until) == 8) {
         $until = $until . '235959';
     }
     $abs_until = $until;
     ereg('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})', $until, $regs);
     $until = mktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]);
     $master_array[$start_date][$hour . $minute][$uid]['recur'][$key] = localizeDate($dateFormat_week, $until, $globals_local);
     break;
 case 'INTERVAL':
     if ($val > 0) {
         $number = $val;
         $master_array[$start_date][$hour . $minute][$uid]['recur'][$key] = $number;
     }
     break;
 case 'BYSECOND':
     $bysecond = $val;
     $bysecond = split(',', $bysecond);
     $master_array[$start_date][$hour . $minute][$uid]['recur'][$key] = $bysecond;
     break;
 case 'BYMINUTE':
     $byminute = $val;
     $byminute = split(',', $byminute);
开发者ID:mediasadc,项目名称:alba,代码行数:31,代码来源:ical_parser.php


示例20: strtotime

<?php

print "<select name=\"action\" class=\"query_style\" onChange=\"window.location=(this.options[this.selectedIndex].value);\">\n";
$month_time = strtotime("{$this_year}-01-01");
$getdate_month = date("m", strtotime($getdate));
// echo "$this_day, $this_year";
// build the <option> tags
for ($i = 0; $i < 12; $i++) {
    $monthdate = date("Ymd", $month_time);
    $month_month = date("m", $month_time);
    $select_month = localizeDate($dateFormat_month, $month_time);
    if ($month_month == $getdate_month) {
        print "<option value=\"month.php?cal={$cal}&amp;getdate={$monthdate}\" selected>{$select_month}</option>\n";
    } else {
        print "<option value=\"month.php?cal={$cal}&amp;getdate={$monthdate}\">{$select_month}</option>\n";
    }
    $month_time = strtotime("+1 month", $month_time);
}
// finish <select>
print "</select>";
开发者ID:dalinhuang,项目名称:sutoj,代码行数:20,代码来源:list_months.php



注:本文中的localizeDate函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP localize_item函数代码示例发布时间:2022-05-15
下一篇:
PHP localize函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap