當前位置: 首頁>>代碼示例>>PHP>>正文


PHP lastday函數代碼示例

本文整理匯總了PHP中lastday函數的典型用法代碼示例。如果您正苦於以下問題:PHP lastday函數的具體用法?PHP lastday怎麽用?PHP lastday使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了lastday函數的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: session_start

<?php

session_start();
if ($_SESSION[username]) {
    include "../includes/conndb.php";
    include "../includes/config.inc.php";
    $dm = date("d/m");
    $d = date("d");
    $m = date("m");
    $yx = date("Y");
    $y = date("Y");
    $daysdatestr = "01/" . $m . "/" . $y;
    $daystart = $y . "-" . $m . "-01";
    $daylast = $yx . "/" . $m;
    $daylast2 = lastday($daylast);
    $dayend = retDatetsxxxx($daylast2);
    $daysdatepick = $dm . "/" . $y;
    $daledcy = date("Y");
    $imputday = $daysdatestr . " - " . $dayend;
    ?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title><?php 
    echo $titleweb;
    ?>
</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- bootstrap 3.0.2 -->
        <link href="../css/bootstrap.min.css" rel="stylesheet" type="text/css" />
開發者ID:nontage24,項目名稱:gis4jhcis,代碼行數:31,代碼來源:papsmear.php

示例2: days_of_year

function days_of_year($jmonth, $jday, $jyear)
{
    $year = "";
    $month = "";
    $year = "";
    $result = "";
    if ($jmonth == "01") {
        return $jday;
    }
    for ($i = 1; $i < $jmonth || $i == 12; $i++) {
        list($year, $month, $day) = jalali_to_gregorian($jyear, $i, "1");
        $result += lastday($month, $day, $year);
    }
    return $result + $jday;
}
開發者ID:tavakkoli,項目名稱:tehlug,代碼行數:15,代碼來源:jdf.php

示例3: exec_query

exec_query("INSERT INTO `{$p}var` (`var`,`value`) VALUES('show_gabBreaks','0')");
exec_query("INSERT INTO `{$p}var` (`var`,`value`) VALUES('show_RecordAgain','1')");
exec_query("INSERT INTO `{$p}var` (`var`,`value`) VALUES('show_TrackingNr','1')");
exec_query("INSERT INTO `{$p}var` (`var`,`value`) VALUES('date_format_0','%d.%m.%Y')");
exec_query("INSERT INTO `{$p}var` (`var`,`value`) VALUES('date_format_1','%d.%m.')");
exec_query("INSERT INTO `{$p}var` (`var`,`value`) VALUES('date_format_2','%d.%m.%Y')");
exec_query("INSERT INTO `{$p}var` (`var`,`value`) VALUES('language','{$kga['language']}')");
exec_query("INSERT INTO `{$p}var` (`var`,`value`) VALUES('roundPrecision','0')");
exec_query("INSERT INTO `{$p}var` (`var`,`value`) VALUES('decimalSeparator',',')");
exec_query("INSERT INTO `{$p}var` (`var`,`value`) VALUES('durationWithSeconds','0')");
exec_query("INSERT INTO `{$p}var` (`var`,`value`) VALUES('defaultTimezone','" . mysql_real_escape_string($_REQUEST['timezone']) . "')");
exec_query("INSERT INTO `{$p}var` (`var`,`value`) VALUES('exactSums','0')");
exec_query("INSERT INTO `{$p}var` (`var`,`value`) VALUES('defaultVat','0')");
// init timespace for admin user to current month
$mon = date("n");
$day = date("j");
$Y = date("Y");
save_timespace(mktime(0, 0, 0, $mon, 1, $Y), mktime(23, 59, 59, $mon, lastday($month = $mon, $year = $Y), $Y), $randomAdminID);
if ($errors) {
    require_once '../libraries/smarty/Smarty.class.php';
    $tpl = new Smarty();
    $tpl->template_dir = '../templates/';
    $tpl->compile_dir = '../compile/';
    $tpl->assign('headline', $kga['lang']['errors'][1]['hdl']);
    $tpl->assign('message', $kga['lang']['errors'][1]['txt']);
    $tpl->display('misc/error.tpl');
    logfile("-- showing install error --------------------------");
} else {
    logfile("-- installation finished without error ------------");
    header("Location: ../index.php");
}
開發者ID:pombredanne,項目名稱:ArcherSys,代碼行數:31,代碼來源:install.php

示例4: jdate


//.........這裏部分代碼省略.........
                $result .= $result1;
                break;
            case 'F':
                list($jyear, $jmonth, $jday) = gregorian_to_jalali($year, $month, $day);
                $result .= Icms_getMonthNameById($jmonth);
                break;
            case 'g':
                $result .= date('g', $need);
                break;
            case 'G':
                $result .= date('G', $need);
                break;
            case 'h':
                $result .= date('h', $need);
                break;
            case 'H':
                $result .= date('H', $need);
                break;
            case 'i':
                $result .= date('i', $need);
                break;
            case 'j':
                list($jyear, $jmonth, $jday) = gregorian_to_jalali($year, $month, $day);
                $result .= $jday;
                break;
            case 'l':
                $result1 = date('l', $need);
                if ($result1 == 'Saturday') {
                    $result1 = _CAL_SATURDAY;
                } else {
                    if ($result1 == 'Sunday') {
                        $result1 = _CAL_SUNDAY;
                    } else {
                        if ($result1 == 'Monday') {
                            $result1 = _CAL_MONDAY;
                        } else {
                            if ($result1 == 'Tuesday') {
                                $result1 = _CAL_TUESDAY;
                            } else {
                                if ($result1 == 'Wednesday') {
                                    $result1 = _CAL_WEDNESDAY;
                                } else {
                                    if ($result1 == 'Thursday') {
                                        $result1 = _CAL_THURSDAY;
                                    } else {
                                        if ($result1 == 'Friday') {
                                            $result1 = _CAL_FRIDAY;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                $result .= $result1;
                break;
            case 'm':
                list($jyear, $jmonth, $jday) = gregorian_to_jalali($year, $month, $day);
                if ($jmonth < 10) {
                    $result1 = '0' . $jmonth;
                } else {
                    $result1 = $jmonth;
                }
                $result .= $result1;
                break;
            case 'M':
                list($jyear, $jmonth, $jday) = gregorian_to_jalali($year, $month, $day);
                $result .= Icms_getMonthNameById($jmonth);
                break;
            case 'n':
                list($jyear, $jmonth, $jday) = gregorian_to_jalali($year, $month, $day);
                $result .= $jmonth;
                break;
            case 's':
                $result .= date('s', $need);
                break;
            case 'S':
                $result .= _CAL_SUFFIX;
                break;
            case 't':
                $result .= lastday($month, $day, $year);
                break;
            case 'w':
                $result .= date('w', $need);
                break;
            case 'y':
                list($jyear, $jmonth, $jday) = gregorian_to_jalali($year, $month, $day);
                $result .= substr($jyear, 2, 4);
                break;
            case 'Y':
                list($jyear, $jmonth, $jday) = gregorian_to_jalali($year, $month, $day);
                $result .= $jyear;
                break;
            default:
                $result .= $subtype;
        }
        $i++;
    }
    return $result;
}
開發者ID:LeeGlendenning,項目名稱:formulize,代碼行數:101,代碼來源:jalali.php

示例5: yearTotalDays

 /**
  * Find days in this year untile now 
  */
 function yearTotalDays($jmonth, $jday, $jyear)
 {
     $year = "";
     $month = "";
     $year = "";
     $result = "";
     if ($jmonth == "01") {
         return $jday;
     }
     for ($i = 1; $i < $jmonth || $i == 12; $i++) {
         list($year, $month, $day) = $this->toGregorian($jyear, $i, "1");
         $result += lastday($month, $day, $year);
     }
     return $result + $jday;
 }
開發者ID:tasfya,項目名稱:maktaba,代碼行數:18,代碼來源:iranian.class.inc.php

示例6: jdate


//.........這裏部分代碼省略.........
                } else {
                    if ($result1 == "Sunday") {
                        $result1 = _JDF_Sun_LONG;
                    } else {
                        if ($result1 == "Monday") {
                            $result1 = _JDF_Mon_LONG;
                        } else {
                            if ($result1 == "Tuesday") {
                                $result1 = _JDF_Tue_LONG;
                            } else {
                                if ($result1 == "Wednesday") {
                                    $result1 = _JDF_Wed_LONG;
                                } else {
                                    if ($result1 == "Thursday") {
                                        $result1 = _JDF_Thu_LONG;
                                    } else {
                                        if ($result1 == "Friday") {
                                            $result1 = _JDF_Fri_LONG;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                $result .= $result1;
                break;
            case "m":
                list($jyear, $jmonth, $jday) = gregorian_to_jalali($year, $month, $day);
                if ($jmonth < 10) {
                    $result1 = "0" . $jmonth;
                } else {
                    $result1 = $jmonth;
                }
                if ($_JDF_USE_PERSIANNUM) {
                    $result .= Convertnumber2farsi($result1);
                } else {
                    $result .= $result1;
                }
                break;
            case "M":
                list($jyear, $jmonth, $jday) = gregorian_to_jalali($year, $month, $day);
                $result .= monthname($jmonth);
                break;
            case "n":
                list($jyear, $jmonth, $jday) = gregorian_to_jalali($year, $month, $day);
                $result1 = $jmonth;
                if ($_JDF_USE_PERSIANNUM) {
                    $result .= Convertnumber2farsi($result1);
                } else {
                    $result .= $result1;
                }
                break;
            case "s":
                $result1 = date("s", $need);
                if ($_JDF_USE_PERSIANNUM) {
                    $result .= Convertnumber2farsi($result1);
                } else {
                    $result .= $result1;
                }
                break;
            case "S":
                $result .= _JDF_Suffix;
                break;
            case "t":
                $result .= lastday($month, $day, $year);
                break;
            case "w":
                $result1 = date("w", $need);
                if ($_JDF_USE_PERSIANNUM) {
                    $result .= Convertnumber2farsi($result1);
                } else {
                    $result .= $result1;
                }
                break;
            case "y":
                list($jyear, $jmonth, $jday) = gregorian_to_jalali($year, $month, $day);
                $result1 = substr($jyear, 2, 4);
                if ($_JDF_USE_PERSIANNUM) {
                    $result .= Convertnumber2farsi($result1);
                } else {
                    $result .= $result1;
                }
                break;
            case "Y":
                list($jyear, $jmonth, $jday) = gregorian_to_jalali($year, $month, $day);
                $result1 = $jyear;
                if ($_JDF_USE_PERSIANNUM) {
                    $result .= Convertnumber2farsi($result1);
                } else {
                    $result .= $result1;
                }
                break;
            default:
                $result .= $subtype;
        }
        $i++;
    }
    return $result;
}
開發者ID:redknight,項目名稱:frot,代碼行數:101,代碼來源:Date.php


注:本文中的lastday函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。