本文整理汇总了PHP中Calendar::Calendar方法的典型用法代码示例。如果您正苦于以下问题:PHP Calendar::Calendar方法的具体用法?PHP Calendar::Calendar怎么用?PHP Calendar::Calendar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Calendar
的用法示例。
在下文中一共展示了Calendar::Calendar方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Month
/**
* Constructs Month
* @param int year e.g. 2003
* @param int month e.g. 5
* @param string first day of the week e.g. Monday (optional)
* @access public
*/
function Month($y, $m, $firstDay = 'Monday')
{
Calendar::Calendar($y, $m);
$this->firstDay = $firstDay;
$this->weekDayNames = array('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday');
$this->dateMath = new DateMath($this->year, $this->month, 1, 0, 0, 0);
$this->setFirstDay();
}
示例2: Week
/**
* Constructs Week
* @param int year e.g. 2003
* @param int month e.g. 5
* @param int week of month e.g. 3
* @param string first day of the week e.g. Monday (optional)
* @access public
*/
function Week($y, $m, $w, $firstDay = 'Monday')
{
Calendar::Calendar($y, $m);
$this->firstDay = $firstDay;
$this->weekDayNames = array('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday');
$this->dateMath = new DateMath($this->year, $this->month, 1, 0, 0, 0);
$this->setFirstDay();
$this->setNumWeeks();
if ($w < 1 || $w > $this->numWeeks) {
trigger_error('Week::Week week ' . $w . ' is invalid');
} else {
$this->thisWeek = $w;
}
}
示例3: Calendar_Hour
/**
* Constructs Calendar_Hour
* @param int year e.g. 2003
* @param int month e.g. 5
* @param int day e.g. 11
* @param int hour e.g. 13
* @access public
*/
function Calendar_Hour($y, $m, $d, $h)
{
Calendar::Calendar($y, $m, $d, $h);
}
示例4: Calendar_Minute
/**
* Constructs Minute
* @param int year e.g. 2003
* @param int month e.g. 5
* @param int day e.g. 11
* @param int hour e.g. 13
* @param int minute e.g. 31
* @access public
*/
function Calendar_Minute($y, $m, $d, $h, $i)
{
Calendar::Calendar($y, $m, $d, $h, $i);
}
示例5: Calendar_Second
/**
* Constructs Second
* @param int year e.g. 2003
* @param int month e.g. 5
* @param int day e.g. 11
* @param int hour e.g. 13
* @param int minute e.g. 31
* @param int second e.g. 45
*/
function Calendar_Second($y, $m, $d, $h, $i, $s)
{
Calendar::Calendar($y, $m, $d, $h, $i, $s);
}
示例6: Calendar_Month
/**
* Constructs Calendar_Month
* @param int $y year e.g. 2003
* @param int $m month e.g. 5
* @param int $firstDay first day of the week [optional]
* @access public
*/
function Calendar_Month($y, $m, $firstDay = null)
{
Calendar::Calendar($y, $m);
$this->firstDay = $this->defineFirstDayOfWeek($firstDay);
}
示例7:
/**
* Constructs Calendar_Year
*
* @param int $y year e.g. 2003
*
* @access public
*/
function Calendar_Year($y)
{
parent::Calendar($y);
}
示例8:
/**
* Constructs Calendar_Day
*
* @param int $y year e.g. 2003
* @param int $m month e.g. 8
* @param int $d day e.g. 15
*
* @access public
*/
function Calendar_Day($y, $m, $d)
{
parent::Calendar($y, $m, $d);
}
示例9: Calendar_Week
/**
* Constructs Week
*
* @param int $y year e.g. 2003
* @param int $m month e.g. 5
* @param int $d a day of the desired week
* @param int $firstDay (optional) first day of week (e.g. 0 for Sunday, 2 for Tuesday etc.)
*
* @access public
*/
function Calendar_Week($y, $m, $d, $firstDay = null)
{
include_once CALENDAR_ROOT . 'Table/Helper.php';
Calendar::Calendar($y, $m, $d);
$this->firstDay = $this->defineFirstDayOfWeek($firstDay);
$this->tableHelper = new Calendar_Table_Helper($this, $this->firstDay);
$this->thisWeek = $this->tableHelper->getWeekStart($y, $m, $d, $this->firstDay);
$this->prevWeek = $this->tableHelper->getWeekStart($y, $m, $d - $this->cE->getDaysInWeek($this->thisYear(), $this->thisMonth(), $this->thisDay()), $this->firstDay);
$this->nextWeek = $this->tableHelper->getWeekStart($y, $m, $d + $this->cE->getDaysInWeek($this->thisYear(), $this->thisMonth(), $this->thisDay()), $this->firstDay);
}
示例10:
/**
* Constructs Minute
*
* @param int $y year e.g. 2003
* @param int $m month e.g. 5
* @param int $d day e.g. 11
* @param int $h hour e.g. 13
* @param int $i minute e.g. 31
*
* @access public
*/
function Calendar_Minute($y, $m, $d, $h, $i)
{
parent::Calendar($y, $m, $d, $h, $i);
}
示例11:
/**
* Constructs Second
*
* @param int $y year e.g. 2003
* @param int $m month e.g. 5
* @param int $d day e.g. 11
* @param int $h hour e.g. 13
* @param int $i minute e.g. 31
* @param int $s second e.g. 45
*/
function Calendar_Second($y, $m, $d, $h, $i, $s)
{
parent::Calendar($y, $m, $d, $h, $i, $s);
}
示例12: Calendar_Month
/**
* Constructs Calendar_Month
* @param int year e.g. 2003
* @param int month e.g. 5
* @param int (optional) unused in this class
* @access public
*/
function Calendar_Month($y, $m, $firstDay = null)
{
Calendar::Calendar($y, $m);
}
示例13:
/**
* Constructs Calendar_Hour
*
* @param int $y year e.g. 2003
* @param int $m month e.g. 5
* @param int $d day e.g. 11
* @param int $h hour e.g. 13
*
* @access public
*/
function Calendar_Hour($y, $m, $d, $h)
{
parent::Calendar($y, $m, $d, $h);
}
示例14: Calendar_Year
/**
* Constructs Calendar_Year
* @param int year e.g. 2003
* @access public
*/
function Calendar_Year($y)
{
Calendar::Calendar($y);
}
示例15: Day
/**
* Constructs Day
* <code>
* $day = new Day (2003,8,15); // 15th August 2003
* </code>
* @param int year e.g. 2003
* @param int month e.g. 8
* @param int day e.g. 15
* @access public
*/
function Day($y, $m, $d)
{
Calendar::Calendar($y, $m, $d);
}