Property | Type | Description | |
---|---|---|---|
$_name | string | A ruleset name. | |
$_rules | array | All Rule lines for this ruleset. | |
$_weekdays | array | List to map weekday descriptions used in the timezone database. |
Method | Description | |
---|---|---|
__construct ( string $name ) | Constructor. | |
add ( array $rule ) | Adds a Rule line to this ruleset. | |
addRules ( Horde_Icalendar_Vtimezone $tz, string $tzid, string $name, array $startOffset, Horde_Date $start, Horde_Date $end = null ) | Adds rules from this ruleset to a VTIMEZONE component. |
Method | Description | |
---|---|---|
_findPreviousOffset ( Horde_Date $date, integer $ruleNo, integer $startOffset ) : integer | Finds the offset of a previous rule. | |
_getDiff ( integer $ruleNo, Horde_Date $date, integer $year ) : integer | Helper method to calculate the difference in days between a date and the occurence of rule. | |
_getFirstMatch ( array $rule, integer $year ) : Horde_Date | Finds a date matching a rule definition. | |
_getOffset ( array $start, string $new ) : array | Calculates the new offset of a timezone. | |
_setTime ( $date, $hour, $minute, $modifier, $utc = false ) |
public __construct ( string $name ) | ||
$name | string | A ruleset name. |
protected _findPreviousOffset ( Horde_Date $date, integer $ruleNo, integer $startOffset ) : integer | ||
$date | Horde_Date | The start date of the current rule. |
$ruleNo | integer | The rule number of the current rule. |
$startOffset | integer | The offset to use for the first rule, and also the default. |
return | integer | The offset of the last rule before the current. |
protected _getFirstMatch ( array $rule, integer $year ) : Horde_Date | ||
$rule | array | A rule definition hash from addRules(). |
$year | integer | A year when the rule should be applied. |
return | Horde_Date | The first matching date. |
public addRules ( Horde_Icalendar_Vtimezone $tz, string $tzid, string $name, array $startOffset, Horde_Date $start, Horde_Date $end = null ) | ||
$tz | Horde_Icalendar_Vtimezone | A VTIMEZONE component. |
$tzid | string | The timezone ID of the component. |
$name | string | A timezone name abbreviation. May contain a placeholder that is replaced the Rules' "Letter(s)" entry. |
$startOffset | array | An offset hash describing the base offset of a timezone. |
$start | Horde_Date | Start of the period to add rules for. |
$end | Horde_Date | End of the period to add rules for. |
protected array $_weekdays | ||
return | array |