当前位置: 首页>>代码示例>>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;未经允许,请勿转载。