Overview

Packages

  • Date

Classes

  • Horde_Date
  • Horde_Date_Exception
  • Horde_Date_Recurrence
  • Horde_Date_Repeater
  • Horde_Date_Repeater_Day
  • Horde_Date_Repeater_DayName
  • Horde_Date_Repeater_DayPortion
  • Horde_Date_Repeater_Fortnight
  • Horde_Date_Repeater_Hour
  • Horde_Date_Repeater_Minute
  • Horde_Date_Repeater_Month
  • Horde_Date_Repeater_MonthName
  • Horde_Date_Repeater_Season
  • Horde_Date_Repeater_SeasonName
  • Horde_Date_Repeater_Second
  • Horde_Date_Repeater_Time
  • Horde_Date_Repeater_Week
  • Horde_Date_Repeater_Weekend
  • Horde_Date_Repeater_Year
  • Horde_Date_Span
  • Horde_Date_Translation
  • Horde_Date_Utils

Exceptions

  • Horde_Date_Repeater_Exception
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Date_Utils

Horde Date wrapper/logic class, including some calculation functions.

Package: Date
Category: Horde
Located at Horde/Date/Utils.php
Methods summary
public static boolean
# isLeapYear( integer $year )

Returns whether a year is a leap year.

Returns whether a year is a leap year.

Parameters

$year
The year.

Returns

boolean
True if the year is a leap year.
public static Horde_Date
# firstDayOfWeek( integer $week, integer $year )

Returns the date of the year that corresponds to the first day of the given week.

Returns the date of the year that corresponds to the first day of the given week.

Parameters

$week
The week of the year to find the first day of.
$year
The year to calculate for.

Returns

Horde_Date
The date of the first day of the given week.
public static integer
# daysInMonth( integer $month, integer $year )

Returns the number of days in the specified month.

Returns the number of days in the specified month.

Parameters

$month
The month
$year
The year.

Returns

integer
The number of days in the month.
public static string
# relativeDateTime( mixed $time, string $date_format = '%x', string $time_format = '%X' )

Returns a relative, natural language representation of a timestamp

Returns a relative, natural language representation of a timestamp

Parameters

$time
The time. Any format accepted by Horde_Date.
$date_format
<p>Format to display date if timestamp is more then 1 day old.</p>
$time_format
<p>Format to display time if timestamp is 1 day old.</p>

Returns

string
The relative time (i.e. 2 minutes ago)
public static string
# strftime2date( string $format )

Tries to convert strftime() formatters to date() formatters.

Tries to convert strftime() formatters to date() formatters.

Unsupported formatters will be removed.

Parameters

$format
A strftime() formatting string.

Returns

string
A date() formatting string.
API documentation generated by ApiGen