Class: PHPExcel_Calculation_DateTime
Source Location: /PHPExcel/Calculation/DateTime.php
PHPExcel_Calculation_DateTime
Author(s):
Copyright:
- Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
|
|
Class Details
Class Methods
static method DATE [line 276]
static mixed DATE(
[integer
$year = 0], [integer
$month = 1], [integer
$day = 1])
|
|
DATE The DATE function returns a value that represents a particular date. NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date format of your regional settings. PHPExcel does not change cell formatting in this way. Excel Function: DATE(year,month,day)
Tags:
Parameters:
static method DATEDIF [line 594]
static integer DATEDIF(
[mixed
$startDate = 0], [mixed
$endDate = 0], [string
$unit = 'D'])
|
|
DATEDIF
Tags:
Parameters:
static method DATENOW [line 208]
DATENOW Returns the current date. The NOW function is useful when you need to display the current date and time on a worksheet or calculate a value based on the current date and time, and have that value updated each time you open the worksheet. NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date and time format of your regional settings. PHPExcel does not change cell formatting in this way. Excel Function: TODAY()
Tags:
static method DATETIMENOW [line 168]
static mixed DATETIMENOW(
)
|
|
DATETIMENOW Returns the current date and time. The NOW function is useful when you need to display the current date and time on a worksheet or calculate a value based on the current date and time, and have that value updated each time you open the worksheet. NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date and time format of your regional settings. PHPExcel does not change cell formatting in this way. Excel Function: NOW()
Tags:
static method DATEVALUE [line 457]
static mixed DATEVALUE(
[string
$dateValue = 1])
|
|
DATEVALUE Returns a value that represents a particular date. Use DATEVALUE to convert a date represented by a text string to an Excel or PHP date/time stamp value. NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date format of your regional settings. PHPExcel does not change cell formatting in this way. Excel Function: DATEVALUE(dateValue)
Tags:
Parameters:
static method DAYOFMONTH [line 1043]
static int DAYOFMONTH(
[mixed
$dateValue = 1])
|
|
DAYOFMONTH Returns the day of the month, for a specified date. The day is given as an integer ranging from 1 to 31. Excel Function: DAY(dateValue)
Tags:
Parameters:
static method DAYOFWEEK [line 1078]
static int DAYOFWEEK(
[mixed
$dateValue = 1], [int
$style = 1])
|
|
DAYOFWEEK Returns the day of the week for a specified date. The day is given as an integer ranging from 0 to 7 (dependent on the requested style). Excel Function: WEEKDAY(dateValue[,style])
Tags:
Parameters:
static method DAYS360 [line 712]
static integer DAYS360(
[mixed
$startDate = 0], [mixed
$endDate = 0], [boolean
$method = false])
|
|
DAYS360 Returns the number of days between two dates based on a 360-day year (twelve 30-day months), which is used in some accounting calculations. Use this function to help compute payments if your accounting system is based on twelve 30-day months. Excel Function: DAYS360(startDate,endDate[,method])
Tags:
Parameters:
static method EDATE [line 1372]
static mixed EDATE(
[mixed
$dateValue = 1], [int
$adjustmentMonths = 0])
|
|
EDATE Returns the serial number that represents the date that is the indicated number of months before or after a specified date (the start_date). Use EDATE to calculate maturity dates or due dates that fall on the same day of the month as the date of issue. Excel Function: EDATE(dateValue,adjustmentMonths)
Tags:
Parameters:
static method EOMONTH [line 1417]
static mixed EOMONTH(
[mixed
$dateValue = 1], [int
$adjustmentMonths = 0])
|
|
EOMONTH Returns the date value for the last day of the month that is the indicated number of months before or after start_date. Use EOMONTH to calculate maturity dates or due dates that fall on the last day of the month. Excel Function: EOMONTH(dateValue,adjustmentMonths)
Tags:
Parameters:
static method HOUROFDAY [line 1246]
static int HOUROFDAY(
[mixed
$timeValue = 0])
|
|
HOUROFDAY Returns the hour of a time value. The hour is given as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.). Excel Function: HOUR(timeValue)
Tags:
Parameters:
static method MINUTEOFHOUR [line 1286]
static int MINUTEOFHOUR(
[mixed
$timeValue = 0])
|
|
MINUTEOFHOUR Returns the minutes of a time value. The minute is given as an integer, ranging from 0 to 59. Excel Function: MINUTE(timeValue)
Tags:
Parameters:
static method MONTHOFYEAR [line 1188]
static int MONTHOFYEAR(
[mixed
$dateValue = 1])
|
|
MONTHOFYEAR Returns the month of a date represented by a serial number. The month is given as an integer, ranging from 1 (January) to 12 (December). Excel Function: MONTH(dateValue)
Tags:
Parameters:
static method NETWORKDAYS [line 858]
static integer NETWORKDAYS(
mixed
$startDate, mixed
$endDate, mixed
$holidays,...)
|
|
NETWORKDAYS Returns the number of whole working days between start_date and end_date. Working days exclude weekends and any dates identified in holidays. Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days worked during a specific term. Excel Function: NETWORKDAYS(startDate,endDate[,holidays[,holiday[,...]]])
Tags:
Parameters:
static method SECONDOFMINUTE [line 1326]
static int SECONDOFMINUTE(
[mixed
$timeValue = 0])
|
|
SECONDOFMINUTE Returns the seconds of a time value. The second is given as an integer in the range 0 (zero) to 59. Excel Function: SECOND(timeValue)
Tags:
Parameters:
static method TIME [line 362]
static mixed TIME(
[integer
$hour = 0], [integer
$minute = 0], [integer
$second = 0])
|
|
TIME The TIME function returns a value that represents a particular time. NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the time format of your regional settings. PHPExcel does not change cell formatting in this way. Excel Function: TIME(hour,minute,second)
Tags:
Parameters:
static method TIMEVALUE [line 559]
static mixed TIMEVALUE(
string
$timeValue)
|
|
TIMEVALUE Returns a value that represents a particular time. Use TIMEVALUE to convert a time represented by a text string to an Excel or PHP date/time stamp value. NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the time format of your regional settings. PHPExcel does not change cell formatting in this way. Excel Function: TIMEVALUE(timeValue)
Tags:
Parameters:
static method WEEKOFYEAR [line 1144]
static int WEEKOFYEAR(
[mixed
$dateValue = 1], [boolean
$method = 1])
|
|
WEEKOFYEAR Returns the week of the year for a specified date. The WEEKNUM function considers the week containing January 1 to be the first week of the year. However, there is a European standard that defines the first week as the one with the majority of days (four or more) falling in the new year. This means that for years in which there are three days or less in the first week of January, the WEEKNUM function returns week numbers that are incorrect according to the European standard. Excel Function: WEEKNUM(dateValue[,style])
Tags:
Parameters:
static method WORKDAY [line 940]
static mixed WORKDAY(
mixed
$startDate, integer
$endDays, mixed
$holidays,...)
|
|
WORKDAY Returns the date that is the indicated number of working days before or after a date (the starting date). Working days exclude weekends and any dates identified as holidays. Use WORKDAY to exclude weekends or holidays when you calculate invoice due dates, expected delivery times, or the number of days of work performed. Excel Function: WORKDAY(startDate,endDays[,holidays[,holiday[,...]]])
Tags:
Parameters:
static method YEAR [line 1217]
static int YEAR(
[mixed
$dateValue = 1])
|
|
YEAR Returns the year corresponding to a date. The year is returned as an integer in the range 1900-9999. Excel Function: YEAR(dateValue)
Tags:
Parameters:
static method YEARFRAC [line 763]
static float YEARFRAC(
[mixed
$startDate = 0], [mixed
$endDate = 0], [integer
$method = 0])
|
|
YEARFRAC Calculates the fraction of the year represented by the number of whole days between two dates (the start_date and the end_date). Use the YEARFRAC worksheet function to identify the proportion of a whole year's benefits or obligations to assign to a specific term. Excel Function: YEARFRAC(startDate,endDate[,method])
Tags:
Parameters:
static method _getDateValue [line 89]
static mixed _getDateValue(
string
$dateValue)
|
|
_getDateValue
Tags:
Parameters:
static method _isLeapYear [line 54]
static boolean _isLeapYear(
integer
$year)
|
|
Identify if a year is a leap year or not
Tags:
Parameters:
|
|