Class sfTime
sfTime class.
A library for manipulating dates in symfony (php).
Author: Stephen Riesenberg <sjohnr@gmail.com>
Version: SVN: $Id$
Located at calendar_base/code/sfTime.class.php
Methods summary
public static
timestamp
|
#
add( timestamp $ts = null, integer $num = 1, integer $unit =
Adds the specified number of given units of time to the given date. |
public static
timestamp
|
#
subtract( timestamp $ts = null, integer $num = 1, integer $unit =
Subtracts the specified number of given units of time from the given date. |
public static
timestamp
|
|
public static
timestamp
|
|
public static
timestamp
|
|
public static
timestamp
|
|
public static
timestamp
|
|
public static
timestamp
|
|
public static
timestamp
|
|
public static
timestamp
|
|
public static
timestamp
|
|
public static
timestamp
|
|
public static
timestamp
|
|
public static
timestamp
|
|
public static
timestamp
|
|
public static
timestamp
|
|
public static
timestamp
|
#
subtractSecond( timestamp $ts = null, integer $num = 1 )
Subtracts the specified number of seconds from the timestamp. |
public static
timestamp
|
|
public static
timestamp
|
#
subtractMinute( timestamp $ts = null, integer $num = 1 )
Subtracts the specified number of minutes from the timestamp. |
public static
timestamp
|
|
public static
timestamp
|
#
subtractHour( timestamp $ts = null, integer $num = 1 )
Subtracts the specified number of hours from the timestamp. |
public static
timestamp
|
|
public static
timestamp
|
#
subtractDay( timestamp $ts = null, integer $num = 1 )
Subtracts the specified number of days from the timestamp. |
public static
timestamp
|
|
public static
timestamp
|
#
subtractWeek( timestamp $ts = null, integer $num = 1 )
Subtracts the specified number of weeks from the timestamp. |
public static
timestamp
|
|
public static
timestamp
|
#
subtractMonth( timestamp $ts = null, integer $num = 1 )
Subtracts the specified number of months from the timestamp. |
public static
timestamp
|
#
addQuarter( timestamp $ts = null, integer $num = 1 )
Adds the specified number of quarters to the timestamp. |
public static
timestamp
|
#
subtractQuarter( timestamp $ts = null, integer $num = 1 )
Subtracts the specified number of quarters from the timestamp. |
public static
timestamp
|
|
public static
timestamp
|
#
subtractYear( timestamp $ts = null, integer $num = 1 )
Subtracts the specified number of years from the timestamp. |
public static
timestamp
|
|
public static
timestamp
|
#
subtractDecade( timestamp $ts = null, integer $num = 1 )
Subtracts the specified number of decades from the timestamp. |
public static
timestamp
|
#
addCentury( timestamp $ts = null, integer $num = 1 )
Adds the specified number of centuries to the timestamp. |
public static
timestamp
|
#
subtractCentury( timestamp $ts = null, integer $num = 1 )
Subtracts the specified number of centuries from the timestamp. |
public static
timestamp
|
#
addMillenium( timestamp $ts = null, integer $num = 1 )
Adds the specified number of millenia to the timestamp. |
public static
timestamp
|
#
subtractMillenium( timestamp $ts = null, integer $num = 1 )
Subtracts the specified number of millenia from the timestamp. |
public static
timestamp
|
#
firstDayOfWeek( timestamp $ts = null )
Returns the timestamp for first day of the week for the given date. |
public static
timestamp
|
#
finalDayOfWeek( timestamp $ts = null )
Returns the timestamp for last day of the week for the given date. |
public static
timestamp
|
#
firstDayOfMonth( timestamp $ts = null )
Returns the timestamp for first day of the month for the given date. |
public static
timestamp
|
#
finalDayOfMonth( timestamp $ts = null )
Returns the timestamp for last day of the month for the given date. |
public static
timestamp
|
#
firstDayOfQuarter( timestamp $ts = null )
Returns the timestamp for first day of thequarter for the given date. |
public static
timestamp
|
#
finalDayOfQuarter( timestamp $ts = null )
Returns the timestamp for last day of the quarter for the given date. |
public static
timestamp
|
#
firstDayOfYear( timestamp $ts = null )
Returns the timestamp for first day of the year for the given date. |
public static
timestamp
|
#
finalDayOfYear( timestamp $ts = null )
Returns the timestamp for last day of the year for the given date. |
public static
timestamp
|
#
nextDay( timestamp $ts = null, integer $day =
Returns the timestamp for the next occurance of [day]. |
public static
timestamp
|
#
previousDay( timestamp $ts = null, integer $day =
Returns the timestamp for the most recent (previous) occurance of [day]. |
public static
timestamp
|
#
nextMonth( timestamp $ts = null, integer $month =
Returns the timestamp for the next occurance of [month]. |
public static
timestamp
|
#
previousMonth( timestamp $ts = null, integer $month =
Returns the timestamp for the most recent (previous) occurance of [month]. |
Magic methods summary
Constants summary
integer |
SECOND
|
0 |
#
Units of time |
integer |
MINUTE
|
1 |
|
integer |
HOUR
|
2 |
|
integer |
DAY
|
3 |
|
integer |
WEEK
|
4 |
|
integer |
MONTH
|
5 |
|
integer |
QUARTER
|
6 |
|
integer |
YEAR
|
7 |
|
integer |
DECADE
|
8 |
|
integer |
CENTURY
|
9 |
|
integer |
MILLENIUM
|
10 |
|
integer |
MONDAY
|
1 |
#
Days of the week |
integer |
TUESDAY
|
2 |
|
integer |
WEDNESDAY
|
3 |
|
integer |
THURSDAY
|
4 |
|
integer |
FRIDAY
|
5 |
|
integer |
SATURDAY
|
6 |
|
integer |
SUNDAY
|
7 |
|
integer |
JANUARY
|
1 |
#
Months of the year |
integer |
FEBRUARY
|
2 |
|
integer |
MARCH
|
3 |
|
integer |
APRIL
|
4 |
|
integer |
MAY
|
5 |
|
integer |
JUNE
|
6 |
|
integer |
JULY
|
7 |
|
integer |
AUGUST
|
8 |
|
integer |
SEPTEMBER
|
9 |
|
integer |
OCTOBER
|
10 |
|
integer |
NOVEMBER
|
11 |
|
integer |
DECEMBER
|
12 |