本文整理汇总了PHP中weekday_short_name函数的典型用法代码示例。如果您正苦于以下问题:PHP weekday_short_name函数的具体用法?PHP weekday_short_name怎么用?PHP weekday_short_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了weekday_short_name函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: display_small_month
function display_small_month($thismonth, $thisyear, $showyear)
{
global $WEEK_START, $user, $login;
if ($user != $login && !empty($user)) {
$u_url = "&user={$user}";
} else {
$u_url = "";
}
echo "<TABLE BORDER=\"0\" CELLPADDING=\"1\" CELLSPACING=\"2\">";
if ($WEEK_START == "1") {
$wkstart = get_monday_before($thisyear, $thismonth, 1);
} else {
$wkstart = get_sunday_before($thisyear, $thismonth, 1);
}
$monthstart = mktime(2, 0, 0, $thismonth, 1, $thisyear);
$monthend = mktime(2, 0, 0, $thismonth + 1, 0, $thisyear);
echo "<TR><TD COLSPAN=\"7\" ALIGN=\"center\">" . "<A HREF=\"month.php?year={$thisyear}&month={$thismonth}" . $u_url . "\" CLASS=\"monthlink\">";
echo month_name($thismonth - 1) . "</A></TD></TR>";
echo "<TR>";
if ($WEEK_START == 0) {
echo "<TD><FONT SIZE=\"-3\">" . weekday_short_name(0) . "</TD>";
}
for ($i = 1; $i < 7; $i++) {
echo "<TD><FONT SIZE=\"-3\">" . weekday_short_name($i) . "</TD>";
}
if ($WEEK_START == 1) {
echo "<TD><FONT SIZE=\"-3\">" . weekday_short_name(0) . "</TD>";
}
for ($i = $wkstart; date("Ymd", $i) <= date("Ymd", $monthend); $i += 24 * 3600 * 7) {
echo "<TR>";
for ($j = 0; $j < 7; $j++) {
$date = $i + $j * 24 * 3600;
if (date("Ymd", $date) >= date("Ymd", $monthstart) && date("Ymd", $date) <= date("Ymd", $monthend)) {
echo "<TD ALIGN=\"right\"><A HREF=\"day.php?date=" . date("Ymd", $date) . $u_url . "\" CLASS=\"dayofmonthyearview\">";
echo "<FONT SIZE=\"-1\">" . date("j", $date) . "</A></FONT></TD>";
} else {
echo "<TD></TD>";
}
}
// end for $j
echo "</TR>";
}
// end for $i
echo "</TABLE>";
}
开发者ID:neuroidss,项目名称:virtuoso-opensource,代码行数:45,代码来源:year.php
示例2: read_events
$events = read_events($viewusers[$i], $startdate, $enddate);
$e_save[$i] = $events;
}
for ($j = 0; $j < 7; $j += $DAYS_PER_TABLE) {
// since print_date_entries is rather stupid, we can swap the event data
// around for users by changing what $events points to.
$tdw = 12;
// column width percent
?>
<table class="main" cellspacing="0" cellpadding="0">
<tr><th class="empty"> </th>
<?php
for ($date = $wkstart, $h = 0; date("Ymd", $date) <= date("Ymd", $wkend); $date += 24 * 3600, $h++) {
$wday = strftime("%w", $date);
$weekday = weekday_short_name($wday);
if (date("Ymd", $date) == date("Ymd", $today)) {
echo "<th class=\"today\" style=\"width:{$tdw}%;\">";
} else {
echo "<th style=\"width:{$tdw}%;\">";
}
echo $weekday . " " . round(date("d", $date)) . "</th>\n";
}
echo "</tr>\n";
for ($i = 0; $i < count($viewusers); $i++) {
echo "\n<tr>\n";
$user = $viewusers[$i];
user_load_variables($user, "temp");
echo "<th class=\"row\" style=\"width:{$tdw}%;\">{$tempfullname}</th>";
for ($date = $wkstart, $h = 0; date("Ymd", $date) <= date("Ymd", $wkend); $date += 24 * 3600, $h++) {
$wday = strftime("%w", $date);
开发者ID:noikiy,项目名称:owaspbwa,代码行数:31,代码来源:view_v.php
示例3: date_to_str
function date_to_str($indate, $format = "", $show_weekday = true, $short_months = false, $server_time = "")
{
global $DATE_FORMAT, $TZ_OFFSET;
if (strlen($indate) == 0) {
$indate = date("Ymd");
}
$newdate = $indate;
if (!empty($server_time)) {
$y = substr($indate, 0, 4);
$m = substr($indate, 4, 2);
$d = substr($indate, 6, 2);
if ($server_time + $TZ_OFFSET * 10000 > 240000) {
$newdate = date("Ymd", mktime(3, 0, 0, $m, $d + 1, $y));
} else {
if ($server_time + $TZ_OFFSET * 10000 < 0) {
$newdate = date("Ymd", mktime(3, 0, 0, $m, $d - 1, $y));
}
}
}
// if they have not set a preference yet...
if ($DATE_FORMAT == "") {
$DATE_FORMAT = "__month__ __dd__, __yyyy__";
}
if (empty($format)) {
$format = $DATE_FORMAT;
}
$y = (int) ($newdate / 10000);
$m = (int) ($newdate / 100) % 100;
$d = $newdate % 100;
$date = mktime(3, 0, 0, $m, $d, $y);
$wday = strftime("%w", $date);
if ($short_months) {
$weekday = weekday_short_name($wday);
$month = month_short_name($m - 1);
} else {
$weekday = weekday_name($wday);
$month = month_name($m - 1);
}
$yyyy = $y;
$yy = sprintf("%02d", $y %= 100);
$ret = $format;
$ret = str_replace("__yyyy__", $yyyy, $ret);
$ret = str_replace("__yy__", $yy, $ret);
$ret = str_replace("__month__", $month, $ret);
$ret = str_replace("__mon__", $month, $ret);
$ret = str_replace("__dd__", $d, $ret);
$ret = str_replace("__mm__", $m, $ret);
if ($show_weekday) {
return "{$weekday}, {$ret}";
} else {
return $ret;
}
}
开发者ID:neuroidss,项目名称:virtuoso-opensource,代码行数:53,代码来源:functions.php
示例4: etranslate
?>
"><IMG SRC="rightarrowsmall.gif" WIDTH="18" HEIGHT="18" BORDER="0" ALT="<?php
etranslate("Next");
?>
"></A></TD>
</TR>
<?php
echo "<TR>";
if ($WEEK_START == 0) {
echo "<TD><FONT SIZE=\"-1\">" . weekday_short_name(0) . "</TD>";
}
for ($i = 1; $i < 7; $i++) {
echo "<TD><FONT SIZE=\"-1\">" . weekday_short_name($i) . "</TD>";
}
if ($WEEK_START == 1) {
echo "<TD><FONT SIZE=\"-1\">" . weekday_short_name(0) . "</TD>";
}
echo "</TR>\n";
if ($WEEK_START == "1") {
$wkstart = get_monday_before($thisyear, $thismonth, 1);
} else {
$wkstart = get_sunday_before($thisyear, $thismonth, 1);
}
$monthstart = mktime(3, 0, 0, $thismonth, 1, $thisyear);
$monthend = mktime(3, 0, 0, $thismonth + 1, 0, $thisyear);
for ($i = $wkstart; date("Ymd", $i) <= date("Ymd", $monthend); $i += 24 * 3600 * 7) {
echo "<TR>\n";
for ($j = 0; $j < 7; $j++) {
$date = $i + $j * 24 * 3600;
if (date("Ymd", $date) >= date("Ymd", $monthstart) && date("Ymd", $date) <= date("Ymd", $monthend)) {
echo "<TD><A HREF=\"javascript:sendDate('" . date("Ymd", $date) . "')\">" . date("d", $date) . "</A></TD>";
开发者ID:neuroidss,项目名称:virtuoso-opensource,代码行数:31,代码来源:datesel.php
示例5: array
}
$HeadX = '';
if ($auto_refresh == "Y" && !empty($auto_refresh_time)) {
$refresh = $auto_refresh_time * 60;
// convert to seconds
$HeadX = "<meta http-equiv=\"refresh\" content=\"{$refresh}; url=week_details.php?{$u_url}" . "date={$startdate}{$caturl}\" />\n";
}
$INC = array('js/popups.php');
print_header($INC, $HeadX);
/* Pre-Load the repeated events for quckier access */
$repeated_events = read_repeated_events(strlen($user) ? $user : $login, $cat_id, $startdate);
/* Pre-load the non-repeating events for quicker access */
$events = read_events(strlen($user) ? $user : $login, $startdate, $enddate, $cat_id);
for ($i = 0; $i < 7; $i++) {
$days[$i] = $wkstart + 24 * 3600 * $i;
$weekdays[$i] = weekday_short_name(($i + $WEEK_START) % 7);
$header[$i] = $weekdays[$i] . " " . date_to_str(date("Ymd", $days[$i]), $DATE_FORMAT_MD, false);
}
?>
<div class="title">
<a title="Previous" class="prev" href="week_details.php?<?php
echo $u_url;
?>
date=<?php
echo date("Ymd", $prev) . $caturl;
?>
"><img src="leftarrow.gif" alt="Previous" /></a>
<a title="Next" class="next" href="week_details.php?<?php
echo $u_url;
?>
开发者ID:BackupTheBerlios,项目名称:fhnreposit,代码行数:31,代码来源:week_details.php
示例6: reset
</b></td>
<?php
}
?>
</tr>
<!-- rows -->
<?php
$count = 0;
for ($row = 1; $row < 7; $row++) {
?>
<tr>
<?php
reset($wdays_ind);
foreach ($wdays_ind as $wday_ind) {
$selected = SELECTED_DATE_DAY == $count + 1 ? 1 : 0;
$count = $count > 0 || weekday_short_name($wday_ind) == $month_begin_wday ? $count + 1 : 0;
if ($count && $count <= $days_in_the_month) {
if ($selected) {
?>
<td align="center" valign="middle" class="BgcolorDull"><span class="FontSoftSmall"><b><?php
echo $count;
?>
</b></span></td>
<?php
} else {
$date = sprintf("%04d-%02d-%02d", SELECTED_DATE_YEAR, SELECTED_DATE_MONTH, $count);
?>
<td align="center" valign="middle" class="BgcolorNormal"><span class="FontSoftSmall"
><a href="<?php
echo href_link(NAV_SCRIPT_NAME, 'date=' . $date . '&' . make_hidden_fields_workstring(array('view', 'loc')), 'NONSSL');
?>
开发者ID:dev-lav,项目名称:htdocs,代码行数:31,代码来源:month_nav_widget.php
示例7: switch
}
default:
$rep_str .= $cal_frequency;
break;
}
}
$rep_str .= ' ';
switch ($cal_type) {
case "daily":
$rep_str .= translate("Day");
break;
case "weekly":
$rep_str .= translate("Week");
for ($i = 0; $i <= 7; $i++) {
if (substr($cal_days, $i, 1) == "y") {
$rep_str .= ", " . weekday_short_name($i);
}
}
break;
case "monthlyByDay":
case "monthlyByDayR":
if ($cal_frequency == 12) {
$rep_str .= month_name($thismonth - 1) . " / ";
} else {
$rep_str .= translate("Month") . " / ";
}
$days_this_month = $thisyear % 4 == 0 ? $ldays_per_month[$thismonth] : $days_per_month[$thismonth];
if ($cal_type == 'monthlyByDay') {
$dow1 = date("w", mktime(3, 0, 0, $thismonth, 1, $thisyear));
$days_in_first_week = 7 - $dow1;
$whichWeek = ceil($thisday / 7);
开发者ID:BackupTheBerlios,项目名称:fhnreposit,代码行数:31,代码来源:view_entry.php
示例8: etranslate
?>
"><img src="rightarrowsmall.gif" class="prevnextsmall" alt="<?php
etranslate("Next");
?>
" /></a></td>
</tr>
<?php
echo "<tr class=\"day\">\n";
if ($WEEK_START == 0) {
echo "<td>" . weekday_short_name(0) . "</td>\n";
}
for ($i = 1; $i < 7; $i++) {
echo "<td>" . weekday_short_name($i) . "</td>\n";
}
if ($WEEK_START == 1) {
echo "<td>" . weekday_short_name(0) . "</td>\n";
}
echo "</tr>\n";
if ($WEEK_START == "1") {
$wkstart = get_monday_before($thisyear, $thismonth, 1);
} else {
$wkstart = get_sunday_before($thisyear, $thismonth, 1);
}
$monthstart = mktime(3, 0, 0, $thismonth, 1, $thisyear);
$monthend = mktime(3, 0, 0, $thismonth + 1, 0, $thisyear);
for ($i = $wkstart; date("Ymd", $i) <= date("Ymd", $monthend); $i += 24 * 3600 * 7) {
echo "<tr>\n";
for ($j = 0; $j < 7; $j++) {
$date = $i + $j * 24 * 3600;
if (date("Ymd", $date) >= date("Ymd", $monthstart) && date("Ymd", $date) <= date("Ymd", $monthend)) {
echo "<td><a href=\"javascript:sendDate('" . date("Ymd", $date) . "')\">" . date("d", $date) . "</a></td>\n";
开发者ID:BackupTheBerlios,项目名称:fhnreposit,代码行数:31,代码来源:datesel.php
示例9: etranslate
?>
" CLASS="monthlink"><img src="rightarrowsmall.gif" width="18" height="18" border="0" alt="<?php
etranslate("Next");
?>
"></A></TD>
</TR>
<?php
echo "<TR>";
if ($WEEK_START == 0) {
echo "<TD BGCOLOR=\"{$CELLBG}\"><FONT SIZE=\"-3\">" . weekday_short_name(0) . "</TD>";
}
for ($i = 1; $i < 7; $i++) {
echo "<TD BGCOLOR=\"{$CELLBG}\"><FONT SIZE=\"-3\">" . weekday_short_name($i) . "</TD>";
}
if ($WEEK_START == 1) {
echo "<TD BGCOLOR=\"{$CELLBG}\"><FONT SIZE=\"-3\">" . weekday_short_name(0) . "</TD>";
}
echo "</TR>\n";
// generate values for first day and last day of month
$monthstart = mktime(3, 0, 0, $thismonth, 1, $thisyear);
$monthend = mktime(3, 0, 0, $thismonth + 1, 0, $thisyear);
if ($WEEK_START == "1") {
$wkstart = get_monday_before($thisyear, $thismonth, 1);
} else {
$wkstart = get_sunday_before($thisyear, $thismonth, 1);
}
$wkend = $wkstart + 3600 * 24 * 7;
for ($i = $wkstart; date("Ymd", $i) <= date("Ymd", $monthend); $i += 24 * 3600 * 7) {
for ($i = $wkstart; date("Ymd", $i) <= date("Ymd", $monthend); $i += 24 * 3600 * 7) {
echo "<TR ALIGN=\"center\">\n";
for ($j = 0; $j < 7; $j++) {
开发者ID:neuroidss,项目名称:virtuoso-opensource,代码行数:31,代码来源:day.php
注:本文中的weekday_short_name函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论