$_name
$_name : string
A ruleset name.
Class representing a set of "Rule" timezone database entries of the same name.
Copyright 2011-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
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.
\Horde_Icalendar_Vtimezone | $tz | A VTIMEZONE component. |
string | $tzid | The timezone ID of the component. |
string | $name | A timezone name abbreviation. May contain a placeholder that is replaced the Rules' "Letter(s)" entry. |
array | $startOffset | An offset hash describing the base offset of a timezone. |
\Horde_Date | $start | Start of the period to add rules for. |
\Horde_Date | $end | End of the period to add rules for. |
_findPreviousOffset(\Horde_Date $date, integer $ruleNo, integer $startOffset) : integer
Finds the offset of a previous rule.
There may be different potential rules that are "before" the current one, and there may even be two sequential daylight rules with different offsets. Thus we go through all earlier rules (as in "before the current rule in the rule definition", because the rules are ordered by start date), and find the one that starts the closest to the start date of the current rule.
\Horde_Date | $date | The start date of the current rule. |
integer | $ruleNo | The rule number of the current rule. |
integer | $startOffset | The offset to use for the first rule, and also the default. |
The offset of the last rule before the current.
_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.
integer | $ruleNo | A rule number. |
\Horde_Date | $date | A date. |
integer | $year | A year. |
The days between the date and the rule occurrence in the year.
_getOffset(array $start, string $new) : array
Calculates the new offset of a timezone.
array | $start | A hash describing the original timezone offset. |
string | $new | A string describing the offset to be added to (or subtracted from) the original offset. |
A hash describing the new timezone offset.