package.xml 0000664 0001750 0001750 00000117414 12227212720 011304 0 ustar jan jan
Horde_Date
pear.horde.org
Horde Date package
Package for creating and manipulating dates.
Jan Schneider
jan
jan@horde.org
yes
Chuck Hagenbuch
chuck
chuck@horde.org
yes
2013-10-15
2.0.7
2.0.0
stable
stable
LGPL-2.1
* [jan] Correct dates with very large days-of-month more efficiently (Bug #12615).
* [jan] Don't limit the argument to Horde_Date_Utils::isLeapYear() to 4 digits.
5.3.0
1.7.0
Horde_Exception
pear.horde.org
2.0.0
3.0.0alpha1
3.0.0alpha1
Horde_Nls
pear.horde.org
2.0.0
3.0.0alpha1
3.0.0alpha1
Horde_Translation
pear.horde.org
2.0.0
3.0.0alpha1
3.0.0alpha1
Horde_Icalendar
pear.horde.org
2.0.0
3.0.0alpha1
3.0.0alpha1
Horde_Test
pear.horde.org
2.1.0
3.0.0alpha1
3.0.0alpha1
calendar
1.0.0alpha1
1.0.0
alpha
alpha
2011-03-08
LGPL-2.1
* First alpha release for Horde 4.
* Add Horde_Date_Repeater.
* Add Horde_Date_Span.
1.0.0beta1
1.0.0
beta
beta
2011-03-16
LGPL-2.1
* First beta release for Horde 4.
1.0.0RC1
1.0.0
beta
beta
2011-03-22
LGPL-2.1
* First release candidate for Horde 4.
1.0.0RC2
1.0.0
beta
beta
2011-03-29
LGPL-2.1
* Second release candidate for Horde 4.
* [jan] Fix correcting dates when substracting a day.
1.0.0
1.0.0
stable
stable
2011-04-06
LGPL-2.1
* First stable release for Horde 4.
1.0.1
1.0.0
stable
stable
2011-05-18
LGPL-2.1
* [jan] Updated Spanish translation.
1.0.2
1.0.0
stable
stable
2011-06-01
LGPL-2.1
* [jan] Updated Slovak translation.
1.0.3
1.0.0
stable
stable
2011-07-05
LGPL-2.1
* [jan] Update Lithuanian translation.
* [jan] Update Brazilian Portuguese translation.
1.0.4
1.0.0
stable
stable
2011-07-27
LGPL-2.1
* [jan] Update Latvian translation.
1.0.5
1.0.0
stable
stable
2011-08-30
LGPL-2.1
* [jan] Fix exporting recurrence end date to iCalendar.
1.0.6
1.0.0
stable
stable
2011-11-22
LGPL-2.1
* [jan] Update Croatian translation.
* [jan] Update Estonian translation.
* [jan] Make unit tests Windows compatible.
* [mjr] Fix timezone bug that could cause an incorrect timezone from being set when creating Horde_Date objects from other Horde_Date or DateTime objects.
* [mjr] Fix timezone bug that caused some date strings to be parsed as an incorrect timezone.
1.0.7
1.0.0
stable
stable
2011-12-06
LGPL-2.1
* [gwr] Fix the parsing of recurrence hash data.
1.0.8
1.0.0
stable
stable
2011-12-13
LGPL-2.1
* [mjr] Fix issue with creating Horde_Date from DateTime object with explicit timezone set.
1.0.9
1.0.0
stable
stable
2011-12-23
LGPL-2.1
* [mjr] Fix creating recurrence objects with a timezone other than the current default.
1.0.10
1.0.0
stable
stable
2012-02-22
LGPL-2.1
* [jan] Update Spanish translation.
1.0.11
1.0.0
stable
stable
2012-06-29
LGPL-2.1
* [jan] Avoid infinite loop when requesting invalid date property.
* [bak] Avoid printing empty BYDAY field on RRULE.
1.0.12
1.0.0
stable
stable
2012-06-29
LGPL-2.1
* [jan] Include time when parsing recurrence end date from vCalendar/iCalendar.
2.0.0alpha1
2.0.0
alpha
alpha
2012-07-06
LGPL-2.1
* First alpha release for Horde 5.
* [jan] Rename fromHash()/toHash() to fromKolab()/toKolab().
2.0.0beta1
2.0.0
beta
alpha
2012-07-19
LGPL-2.1
* First beta release for Horde 5.
2.0.0beta2
2.0.0
beta
alpha
2012-08-29
LGPL-2.1
* [jan] Include time when parsing recurrence end date from vCalendar/iCalendar.
2.0.0beta3
2.0.0
beta
alpha
2012-10-12
LGPL-2.1
* [mjr] Fix adding completed recurrence exceptions.
2.0.0RC1
2.0.0
beta
alpha
2012-10-26
LGPL-2.1
* [jan] Support non-padding operators in strftime() formatting (Bug #10435).
2.0.0
2.0.0
stable
stable
2012-10-30
LGPL-2.1
* First stable release for Horde 5.
2.0.1
2.0.0
stable
stable
2012-11-06
LGPL-2.1
* [jan] Update Dutch translation (Arjen de Korte <build+horde@de-korte.org>).
* [jan] Fix strftime() formatting of certain locale-specific format specifiers.
2.0.2
2.0.0
stable
stable
2013-01-09
LGPL-2.1
* [jan] Add Basque translation (Ibon Igartua <ibon.igartua@ehu.es>).
* [jan] Fix more strftime() formatting of certain locale-specific format specifiers (Bug #11831).
2.0.3
2.0.0
stable
stable
2013-01-29
LGPL-2.1
* [jan] Update French translation (Paul De Vlieger <paul.de_vlieger@moniut.univ-bpclermont.fr>).
* [jan] Fix error: DateTime::__construct(): Failed to parse time string (-001-11-01).
* [jan] Catch DateTime exception in Horde_Date_Utils:daysInMonth() (Bug #11916).
2.0.4
2.0.0
stable
stable
2013-03-05
LGPL-2.1
* [jan] Fix recurring dates on the 5th weekday of a month (Bug #11181).
2.0.5
2.0.0
stable
stable
2013-05-06
LGPL-2.1
* [jan] Fix parsing yearly recurrences on the same day from Kolab data (Bug #12227).
2.0.6
2.0.0
stable
stable
2013-05-28
LGPL-2.1
* [jan] Don't use /e modifier with preg_replace() calls (Remi Collet <fedora@famillecollet.com>).
2.0.7
2.0.0
stable
stable
2013-10-15
LGPL-2.1
* [jan] Correct dates with very large days-of-month more efficiently (Bug #12615).
* [jan] Don't limit the argument to Horde_Date_Utils::isLeapYear() to 4 digits.
Horde_Date-2.0.7/doc/Horde/Date/COPYING 0000664 0001750 0001750 00000057656 12227212717 015366 0 ustar jan jan GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
Horde_Date-2.0.7/doc/Horde/Date/UPGRADING 0000664 0001750 0001750 00000000661 12227212717 015556 0 ustar jan jan ======================
Upgrading Horde_Date
======================
:Contact: dev@lists.horde.org
.. contents:: Contents
.. section-numbering::
This lists the API changes between releases of the package.
Upgrading to 2.0
================
- Horde_Date_Recurrence#toHash()/Horde_Date_Recurrence#fromHash()
These method have been renamed to toKolab() and fromKolab(),
because the hash format is really Kolab-specific.
Horde_Date-2.0.7/lib/Horde/Date/Repeater/Day.php 0000664 0001750 0001750 00000004671 12227212717 017316 0 ustar jan jan currentDayStart) {
$this->currentDayStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day));
}
$direction = ($pointer == 'future') ? 1 : -1;
$this->currentDayStart->day += $direction;
$end = clone $this->currentDayStart;
$end->day += 1;
return new Horde_Date_Span($this->currentDayStart, $end);
}
public function this($pointer = 'future')
{
parent::this($pointer);
switch ($pointer) {
case 'future':
$dayBegin = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour + 1));
$dayEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day + 1));
break;
case 'past':
$dayBegin = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day));
$dayEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour));
break;
case 'none':
$dayBegin = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day));
$dayEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day + 1));
break;
}
return new Horde_Date_Span($dayBegin, $dayEnd);
}
public function offset($span, $amount, $pointer)
{
$direction = ($pointer == 'future') ? 1 : -1;
return $span->add(array('day' => $direction * $amount));
}
public function width()
{
return self::DAY_SECONDS;
}
public function __toString()
{
return parent::__toString() . '-day';
}
}
Horde_Date-2.0.7/lib/Horde/Date/Repeater/DayName.php 0000664 0001750 0001750 00000004423 12227212717 020112 0 ustar jan jan type = $type;
}
public function next($pointer = 'future')
{
parent::next($pointer);
$direction = ($pointer == 'future') ? 1 : -1;
if (!$this->currentDayStart) {
$this->currentDayStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day + $direction));
$dayNum = $this->_dayNumber($this->type);
while ($this->currentDayStart->dayOfWeek() != $dayNum) {
$this->currentDayStart->day += $direction;
}
} else {
$this->currentDayStart->day += $direction * 7;
}
$end = clone $this->currentDayStart;
$end->day++;
return new Horde_Date_Span($this->currentDayStart, $end);
}
public function this($pointer = 'future')
{
parent::next($pointer);
if ($pointer == 'none') {
$pointer = 'future';
}
return $this->next($pointer);
}
public function width()
{
return self::DAY_SECONDS;
}
public function __toString()
{
return parent::__toString() . '-dayname-' . $this->type;
}
protected function _dayNumber($dayName)
{
$days = array(
'monday' => Horde_Date::DATE_MONDAY,
'tuesday' => Horde_Date::DATE_TUESDAY,
'wednesday' => Horde_Date::DATE_WEDNESDAY,
'thursday' => Horde_Date::DATE_THURSDAY,
'friday' => Horde_Date::DATE_FRIDAY,
'saturday' => Horde_Date::DATE_SATURDAY,
'sunday' => Horde_Date::DATE_SUNDAY,
);
if (!isset($days[$dayName])) {
throw new InvalidArgumentException('Invalid day name "' . $dayName . '"');
}
return $days[$dayName];
}
}
Horde_Date-2.0.7/lib/Horde/Date/Repeater/DayPortion.php 0000664 0001750 0001750 00000012155 12227212717 020665 0 ustar jan jan type = $type;
if (is_int($type)) {
$this->range = array(($type * 3600), (($type + 12) * 3600));
} else {
$lookup = array(
'am' => array(0, (12 * 3600 - 1)),
'pm' => array((12 * 3600), (24 * 3600 - 1)),
'morning' => self::$morning,
'afternoon' => self::$afternoon,
'evening' => self::$evening,
'night' => self::$night,
);
if (!isset($lookup[$type])) {
throw new InvalidArgumentException("Invalid type '$type' for Repeater_DayPortion");
}
$this->range = $lookup[$type];
}
}
public function next($pointer = 'future')
{
parent::next($pointer);
if (!$this->currentSpan) {
$nowSeconds = $this->now->hour * 3600 + $this->now->min * 60 + $this->now->sec;
if ($nowSeconds < $this->range[0]) {
switch ($pointer) {
case 'future':
$rangeStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'sec' => $this->range[0]));
break;
case 'past':
$rangeStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day - 1, 'sec' => $this->range[0]));
break;
}
} elseif ($nowSeconds > $this->range[1]) {
switch ($pointer) {
case 'future':
$rangeStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day + 1, 'sec' => $this->range[0]));
break;
case 'past':
$rangeStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'sec' => $this->range[0]));
break;
}
} else {
switch ($pointer) {
case 'future':
$rangeStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day + 1, 'sec' => $this->range[0]));
break;
case 'past':
$rangeStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day - 1, 'sec' => $this->range[0]));
break;
}
}
$rangeEnd = $rangeStart->add($this->range[1] - $this->range[0]);
$this->currentSpan = new Horde_Date_Span($rangeStart, $rangeEnd);
} else {
switch ($pointer) {
case 'future':
$this->currentSpan = $this->currentSpan->add(array('day' => 1));
break;
case 'past':
$this->currentSpan = $this->currentSpan->add(array('day' => -1));
break;
}
}
return $this->currentSpan;
}
public function this($context = 'future')
{
parent::this($context);
$rangeStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'sec' => $this->range[0]));
$this->currentSpan = new Horde_Date_Span($rangeStart, $rangeStart->add($this->range[1] - $this->range[0]));
return $this->currentSpan;
}
public function offset($span, $amount, $pointer)
{
$this->now = $span->begin;
$portionSpan = $this->next($pointer);
$direction = ($pointer == 'future') ? 1 : -1;
return $portionSpan->add(array('day' => $direction * ($amount - 1)));
}
public function width()
{
if (!$this->range) {
throw new Horde_Date_Repeater_Exception('Range has not been set');
}
if ($this->currentSpan) {
return $this->currentSpan->width();
}
if (is_int($this->type)) {
return (12 * 3600);
} else {
return $this->range[1] - $this->range[0];
}
}
public function __toString()
{
return parent::__toString() . '-dayportion-' . $this->type;
}
}
Horde_Date-2.0.7/lib/Horde/Date/Repeater/Exception.php 0000664 0001750 0001750 00000000552 12227212717 020531 0 ustar jan jan currentFortnightStart) {
switch ($pointer) {
case 'future':
$sundayRepeater = new Horde_Date_Repeater_DayName('sunday');
$sundayRepeater->now = $this->now;
$nextSundaySpan = $sundayRepeater->next('future');
$this->currentFortnightStart = $nextSundaySpan->begin;
break;
case 'past':
$sundayRepeater = new Horde_Date_Repeater_DayName('sunday');
$sundayRepeater->now = clone $this->now;
$sundayRepeater->now->day++;
$sundayRepeater->next('past');
$sundayRepeater->next('past');
$lastSundaySpan = $sundayRepeater->next('past');
$this->currentFortnightStart = $lastSundaySpan->begin;
break;
}
} else {
$direction = ($pointer == 'future') ? 1 : -1;
$this->currentFortnightStart->add($direction * self::FORTNIGHT_SECONDS);
}
return new Horde_Date_Span($this->currentFortnightStart, $this->currentFortnightStart->add(self::FORTNIGHT_SECONDS));
}
public function this($pointer = 'future')
{
parent::this($pointer);
switch ($pointer) {
case 'future':
case 'none':
$thisFortnightStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour + 1));
$sundayRepeater = new Horde_Date_Repeater_DayName('sunday');
$sundayRepeater->now = $this->now;
$sundayRepeater->this('future');
$thisSundaySpan = $sundayRepeater->this('future');
$thisFortnightEnd = $thisSundaySpan->begin;
return new Horde_Date_Span($thisFortnightStart, $thisFortnightEnd);
case 'past':
$thisFortnightEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour));
$sundayRepeater = new Horde_Date_Repeater_DayName('sunday');
$sundayRepeater->now = $this->now;
$lastSundaySpan = $sundayRepeater->next('past');
$thisFortnightStart = $lastSundaySpan->begin;
return new Horde_Date_Span($thisFortnightStart, $thisFortnightEnd);
}
}
public function offset($span, $amount, $pointer)
{
$direction = ($pointer == 'future') ? 1 : -1;
return $span->add($direction * $amount * self::FORTNIGHT_SECONDS);
}
public function width()
{
return self::FORTNIGHT_SECONDS;
}
public function __toString()
{
return parent::__toString() . '-fortnight';
}
}
Horde_Date-2.0.7/lib/Horde/Date/Repeater/Hour.php 0000664 0001750 0001750 00000004736 12227212717 017520 0 ustar jan jan currentHourStart) {
$this->currentHourStart = new Horde_Date(array('month' => $this->now->month, 'year' => $this->now->year, 'day' => $this->now->day, 'hour' => $this->now->hour));
}
$this->currentHourStart->hour += $direction;
$end = clone $this->currentHourStart;
$end->hour++;
return new Horde_Date_Span($this->currentHourStart, $end);
}
public function this($pointer = 'future')
{
parent::this($pointer);
switch ($pointer) {
case 'future':
$hourStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour, 'min' => $this->now->min + 1));
$hourEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour + 1));
break;
case 'past':
$hourStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour));
$hourEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour, 'min' => $this->now->min));
break;
case 'none':
$hourStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour));
$hourEnd = $hourStart->add(array('hour' => 1));
break;
}
return new Horde_Date_Span($hourStart, $hourEnd);
}
public function offset($span, $amount, $pointer)
{
$direction = ($pointer == 'future') ? 1 : -1;
return $span->add(array('hour' => $direction * $amount));
}
public function width()
{
return 3600;
}
public function __toString()
{
return parent::__toString() . '-hour';
}
}
Horde_Date-2.0.7/lib/Horde/Date/Repeater/Minute.php 0000664 0001750 0001750 00000004673 12227212717 020044 0 ustar jan jan currentMinuteStart) {
$this->currentMinuteStart = new Horde_Date(array('month' => $this->now->month, 'year' => $this->now->year, 'day' => $this->now->day, 'hour' => $this->now->hour, 'min' => $this->now->min));
}
$direction = ($pointer == 'future') ? 1 : -1;
$this->currentMinuteStart->min += $direction;
$end = clone $this->currentMinuteStart;
$end->min++;
return new Horde_Date_Span($this->currentMinuteStart, $end);
}
public function this($pointer = 'future')
{
parent::this($pointer);
switch ($pointer) {
case 'future':
$minuteBegin = clone $this->now;
$minuteEnd = new Horde_Date(array('month' => $this->now->month, 'year' => $this->now->year, 'day' => $this->now->day, 'hour' => $this->now->hour, 'min' => $this->now->min));
break;
case 'past':
$minuteBegin = new Horde_Date(array('month' => $this->now->month, 'year' => $this->now->year, 'day' => $this->now->day, 'hour' => $this->now->hour, 'min' => $this->now->min));
$minuteEnd = clone $this->now;
break;
case 'none':
$minuteBegin = new Horde_Date(array('month' => $this->now->month, 'year' => $this->now->year, 'day' => $this->now->day, 'hour' => $this->now->hour, 'min' => $this->now->min));
$minuteEnd = new Horde_Date(array('month' => $this->now->month, 'year' => $this->now->year, 'day' => $this->now->day, 'hour' => $this->now->hour, 'min' => $this->now->min + 1));
break;
}
return new Horde_Date_Span($minuteBegin, $minuteEnd);
}
public function offset($span, $amount, $pointer)
{
$direction = ($pointer == 'future') ? 1 : -1;
return $span->add(array('min' => $direction * $amount));
}
public function width()
{
return 60;
}
public function __toString()
{
return parent::__toString() . '-minute';
}
}
Horde_Date-2.0.7/lib/Horde/Date/Repeater/Month.php 0000664 0001750 0001750 00000004565 12227212717 017670 0 ustar jan jan currentMonthStart) {
$this->currentMonthStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => 1));
}
$direction = ($pointer == 'future') ? 1 : -1;
$this->currentMonthStart->month += $direction;
$end = clone $this->currentMonthStart;
$end->month++;
return new Horde_Date_Span($this->currentMonthStart, $end);
}
public function this($pointer = 'future')
{
parent::this($pointer);
switch ($pointer) {
case 'future':
$monthStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day + 1));
$monthEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month + 1, 'day' => 1));
break;
case 'past':
$monthStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => 1));
$monthEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day));
break;
case 'none':
$monthStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => 1));
$monthEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month + 1, 'day' => 1));
break;
}
return new Horde_Date_Span($monthStart, $monthEnd);
}
public function offset($span, $amount, $pointer)
{
$direction = ($pointer == 'future') ? 1 : -1;
return $span->add(array('month' => $amount * $direction));
}
public function width()
{
return self::MONTH_SECONDS;
}
public function __toString()
{
return parent::__toString() . '-month';
}
}
Horde_Date-2.0.7/lib/Horde/Date/Repeater/MonthName.php 0000664 0001750 0001750 00000006776 12227212717 020477 0 ustar jan jan type = $type;
}
public function next($pointer = 'future')
{
parent::next($pointer);
if (!$this->currentMonthStart) {
$targetMonth = $this->_monthNumber($this->type);
switch ($pointer) {
case 'future':
if ($this->now->month < $targetMonth) {
$this->currentMonthStart = new Horde_Date(array('year' => $this->now->year, 'month' => $targetMonth, 'day' => 1));
} else {
$this->currentMonthStart = new Horde_Date(array('year' => $this->now->year + 1, 'month' => $targetMonth, 'day' => 1));
}
break;
case 'none':
if ($this->now->month <= $targetMonth) {
$this->currentMonthStart = new Horde_Date(array('year' => $this->now->year, 'month' => $targetMonth, 'day' => 1));
} else {
$this->currentMonthStart = new Horde_Date(array('year' => $this->now->year + 1, 'month' => $targetMonth, 'day' => 1));
}
break;
case 'past':
if ($this->now->month > $targetMonth) {
$this->currentMonthStart = new Horde_Date(array('year' => $this->now->year, 'month' => $targetMonth, 'day' => 1));
} else {
$this->currentMonthStart = new Horde_Date(array('year' => $this->now->year - 1, 'month' => $targetMonth, 'day' => 1));
}
break;
}
} else {
switch ($pointer) {
case 'future':
$this->currentMonthStart->year++;
break;
case 'past':
$this->currentMonthStart->year--;
break;
}
}
return new Horde_Date_Span($this->currentMonthStart, $this->currentMonthStart->add(array('month' => 1)));
}
public function this($pointer = 'future')
{
parent::this($pointer);
switch ($pointer) {
case 'past':
return $this->next($pointer);
case 'future':
case 'none':
return $this->next('none');
}
}
public function width()
{
return Horde_Date_Repeater_Month::MONTH_SECONDS;
}
public function index()
{
return $this->_monthNumber($this->type);
}
public function __toString()
{
return parent::__toString() . '-monthname-' . $this->type;
}
protected function _monthNumber($monthName)
{
$months = array(
'january' => 1,
'february' => 2,
'march' => 3,
'april' => 4,
'may' => 5,
'june' => 6,
'july' => 7,
'august' => 8,
'september' => 9,
'october' => 10,
'november' => 11,
'december' => 12,
);
if (!isset($months[$monthName])) {
throw new InvalidArgumentException('Invalid month name "' . $monthName . '"');
}
return $months[$monthName];
}
} Horde_Date-2.0.7/lib/Horde/Date/Repeater/Season.php 0000664 0001750 0001750 00000001652 12227212717 020025 0 ustar jan jan type = $type;
}
public function next($pointer = 'future')
{
parent::next($pointer);
throw new Horde_Date_Repeater_Exception('Not implemented');
}
public function this($pointer = 'future')
{
parent::this($pointer);
throw new Horde_Date_Repeater_Exception('Not implemented');
}
public function width()
{
return self::SEASON_SECONDS;
}
public function __toString()
{
return parent::__toString() . '-season-' . $this->type;
}
}
Horde_Date-2.0.7/lib/Horde/Date/Repeater/Second.php 0000664 0001750 0001750 00000002570 12227212717 020010 0 ustar jan jan secondStart) {
$this->secondStart = clone $this->now;
$this->secondStart->sec += $direction;
} else {
$this->secondStart += $direction;
}
$end = clone $this->secondStart;
$end->sec++;
return new Horde_Date_Span($this->secondStart, $end);
}
public function this($pointer = 'future')
{
parent::this($pointer);
$end = clone $this->now;
$end->sec++;
return new Horde_Date_Span($this->now, $end);
}
public function offset($span, $amount, $pointer)
{
$direction = ($pointer == 'future') ? 1 : -1;
return $span->add($direction * $amount);
}
public function width()
{
return 1;
}
public function __toString()
{
return parent::__toString() . '-second';
}
}
Horde_Date-2.0.7/lib/Horde/Date/Repeater/Time.php 0000664 0001750 0001750 00000012145 12227212717 017472 0 ustar jan jan ambiguous = true;
$this->type = ($hours == 12) ? 0 : $hours * 3600;
break;
case 3:
$this->ambiguous = true;
$this->type = $t[0] * 3600 + (int)substr($t, 1, 2) * 60;
break;
case 4:
$this->ambiguous = (strpos($time, ':') !== false) && ($t[0] != 0) && ((int)substr($t, 0, 2) <= 12);
$hours = (int)substr($t, 0, 2);
$this->type = ($hours == 12) ?
((int)substr($t, 2, 2) * 60) :
($hours * 60 * 60 + (int)substr($t, 2, 2) * 60);
break;
case 5:
$this->ambiguous = true;
$this->type = $t[0] * 3600 + (int)substr($t, 1, 2) * 60 + (int)substr($t, 3, 2);
break;
case 6:
$this->ambiguous = (strpos($time, ':') !== false) && ($t[0] != 0) && ((int)substr($t, 0, 2) <= 12);
$hours = (int)substr($t, 0, 2);
$this->type = ($hours == 12) ?
((int)substr($t, 2, 2) * 60 + (int)substr($t, 4, 2)) :
($hours * 60 * 60 + (int)substr($t, 2, 2) * 60 + (int)substr($t, 4, 2));
break;
default:
throw new Horde_Date_Repeater_Exception('Time cannot exceed six digits');
}
}
/**
* Return the next past or future Span for the time that this Repeater represents
* pointer - Symbol representing which temporal direction to fetch the next day
* must be either :past or :future
*/
public function next($pointer = 'future')
{
parent::next($pointer);
$halfDay = 3600 * 12;
$fullDay = 3600 * 24;
$first = false;
if (!$this->currentTime) {
$first = true;
$midnight = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day));
$yesterdayMidnight = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day - 1));
$tomorrowMidnight = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day + 1));
if ($pointer == 'future') {
if ($this->ambiguous) {
foreach (array($midnight->add($this->type), $midnight->add($halfDay + $this->type), $tomorrowMidnight->add($this->type)) as $t) {
if ($t->compareDateTime($this->now) >= 0) {
$this->currentTime = $t;
break;
}
}
} else {
foreach (array($midnight->add($this->type), $tomorrowMidnight->add($this->type)) as $t) {
if ($t->compareDateTime($this->now) >= 0) {
$this->currentTime = $t;
break;
}
}
}
} elseif ($pointer == 'past') {
if ($this->ambiguous) {
foreach (array($midnight->add($halfDay + $this->type), $midnight->add($this->type), $yesterdayMidnight->add($this->type * 2)) as $t) {
if ($t->compareDateTime($this->now) <= 0) {
$this->currentTime = $t;
break;
}
}
} else {
foreach (array($midnight->add($this->type), $yesterdayMidnight->add($this->type)) as $t) {
if ($t->compareDateTime($this->now) <= 0) {
$this->currentTime = $t;
break;
}
}
}
}
if (!$this->currentTime) {
throw new Horde_Date_Repeater_Exception('Current time cannot be null at this point');
}
}
if (!$first) {
$increment = $this->ambiguous ? $halfDay : $fullDay;
$this->currentTime->sec += ($pointer == 'future') ? $increment : -$increment;
}
return new Horde_Date_Span($this->currentTime, $this->currentTime->add(1));
}
public function this($context = 'future')
{
parent::this($context);
if ($context == 'none') {
$context = 'future';
}
return $this->next($context);
}
public function width()
{
return 1;
}
public function __toString()
{
return parent::__toString() . '-time-' . $this->type;
}
}
Horde_Date-2.0.7/lib/Horde/Date/Repeater/Week.php 0000664 0001750 0001750 00000006663 12227212717 017477 0 ustar jan jan currentWeekStart) {
switch ($pointer) {
case 'future':
$sundayRepeater = new Horde_Date_Repeater_DayName('sunday');
$sundayRepeater->now = $this->now;
$nextSundaySpan = $sundayRepeater->next('future');
$this->currentWeekStart = $nextSundaySpan->begin;
break;
case 'past':
$sundayRepeater = new Horde_Date_Repeater_DayName('sunday');
$sundayRepeater->now = clone $this->now;
$sundayRepeater->now->day++;
$sundayRepeater->next('past');
$lastSundaySpan = $sundayRepeater->next('past');
$this->currentWeekStart = $lastSundaySpan->begin;
break;
}
} else {
$direction = ($pointer == 'future') ? 1 : -1;
$this->currentWeekStart->day += $direction * 7;
}
return new Horde_Date_Span($this->currentWeekStart, $this->currentWeekStart->add(array('day' => 7)));
}
public function this($pointer = 'future')
{
parent::this($pointer);
switch ($pointer) {
case 'future':
$thisWeekStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour + 1));
$sundayRepeater = new Horde_Date_Repeater_DayName('sunday');
$sundayRepeater->now = $this->now;
$thisSundaySpan = $sundayRepeater->this('future');
$thisWeekEnd = $thisSundaySpan->begin;
return new Horde_Date_Span($thisWeekStart, $thisWeekEnd);
case 'past':
$thisWeekEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day, 'hour' => $this->now->hour));
$sundayRepeater = new Horde_Date_Repeater_DayName('sunday');
$sundayRepeater->now = $this->now;
$lastSundaySpan = $sundayRepeater->next('past');
$thisWeekStart = $lastSundaySpan->begin;
return new Horde_Date_Span($thisWeekStart, $thisWeekEnd);
case 'none':
$sundayRepeater = new Horde_Date_Repeater_DayName('sunday');
$sundayRepeater->now = $this->now;
$lastSundaySpan = $sundayRepeater->next('past');
$thisWeekStart = $lastSundaySpan->begin;
$thisWeekEnd = clone $thisWeekStart;
$thisWeekEnd->day += 7;
return new Horde_Date_Span($thisWeekStart, $thisWeekEnd);
}
}
public function offset($span, $amount, $pointer)
{
$direction = ($pointer == 'future') ? 1 : -1;
return $span->add(array('day' => $direction * $amount * 7));
}
public function width()
{
return self::WEEK_SECONDS;
}
public function __toString()
{
return parent::__toString() . '-week';
}
}
Horde_Date-2.0.7/lib/Horde/Date/Repeater/Weekend.php 0000664 0001750 0001750 00000005624 12227212717 020162 0 ustar jan jan currentWeekStart) {
switch ($pointer) {
case 'future':
$saturdayRepeater = new Horde_Date_Repeater_DayName('saturday');
$saturdayRepeater->now = $this->now;
$nextSaturdaySpan = $saturdayRepeater->next('future');
$this->currentWeekStart = $nextSaturdaySpan->begin;
break;
case 'past':
$saturdayRepeater = new Horde_Date_Repeater_DayName('saturday');
$saturdayRepeater->now = $this->now;
$saturdayRepeater->now->day++;
$lastSaturdaySpan = $saturdayRepeater->next('past');
$this->currentWeekStart = $lastSaturdaySpan->begin;
break;
}
} else {
$direction = ($pointer == 'future') ? 1 : -1;
$this->currentWeekStart->day += $direction * 7;
}
return new Horde_Date_Span($this->currentWeekStart, $this->currentWeekStart->add(array('day' => 2)));
}
public function this($pointer = 'future')
{
parent::this($pointer);
switch ($pointer) {
case 'future':
case 'none':
$saturdayRepeater = new Horde_Date_Repeater_DayName('saturday');
$saturdayRepeater->now = $this->now;
$thisSaturdaySpan = $saturdayRepeater->this('future');
return new Horde_Date_Span($thisSaturdaySpan->begin, $thisSaturdaySpan->begin->add(array('day' => 2)));
case 'past':
$saturdayRepeater = new Horde_Date_Repeater_DayName('saturday');
$saturdayRepeater->now = $this->now;
$lastSaturdaySpan = $saturdayRepeater->this('past');
return new Horde_Date_Span($lastSaturdaySpan->begin, $lastSaturdaySpan->begin->add(array('day' => 2)));
}
}
public function offset($span, $amount, $pointer)
{
$direction = ($pointer == 'future') ? 1 : -1;
$weekend = new self();
$weekend->now = clone $span->begin;
$start = $weekend->next($pointer)->begin;
$start->day += ($amount - 1) * $direction * 7;
return new Horde_Date_Span($start, $start->add($span->width()));
}
public function width()
{
return self::WEEKEND_SECONDS;
}
public function __toString()
{
return parent::__toString() . '-weekend';
}
}
Horde_Date-2.0.7/lib/Horde/Date/Repeater/Year.php 0000664 0001750 0001750 00000004307 12227212717 017475 0 ustar jan jan currentYearStart) {
$this->currentYearStart = new Horde_Date(array('year' => $this->now->year, 'month' => 1, 'day' => 1));
}
$diff = ($pointer == 'future') ? 1 : -1;
$this->currentYearStart->year += $diff;
return new Horde_Date_Span($this->currentYearStart, $this->currentYearStart->add(array('year' => 1)));
}
public function this($pointer = 'future')
{
parent::this($pointer);
switch ($pointer) {
case 'future':
$thisYearStart = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day + 1));
$thisYearEnd = new Horde_Date(array('year' => $this->now->year + 1, 'month' => 1, 'day' => 1));
break;
case 'past':
$thisYearStart = new Horde_Date(array('year' => $this->now->year, 'month' => 1, 'day' => 1));
$thisYearEnd = new Horde_Date(array('year' => $this->now->year, 'month' => $this->now->month, 'day' => $this->now->day));
break;
case 'none':
$thisYearStart = new Horde_Date(array('year' => $this->now->year, 'month' => 1, 'day' => 1));
$thisYearEnd = new Horde_Date(array('year' => $this->now->year + 1, 'month' => 1, 'day' => 1));
break;
}
return new Horde_Date_Span($thisYearStart, $thisYearEnd);
}
public function offset($span, $amount, $pointer)
{
$direction = ($pointer == 'future') ? 1 : -1;
return $span->add(array('year' => ($amount * $direction)));
}
public function width()
{
return (365 * 24 * 60 * 60);
}
public function __toString()
{
return parent::__toString() . '-year';
}
}
Horde_Date-2.0.7/lib/Horde/Date/Exception.php 0000664 0001750 0001750 00000000640 12227212717 016760 0 ustar jan jan
* @category Horde
* @package Date
*/
class Horde_Date_Exception extends Horde_Exception_Wrapped
{
}
Horde_Date-2.0.7/lib/Horde/Date/Recurrence.php 0000664 0001750 0001750 00000147110 12227212717 017123 0 ustar jan jan
* @category Horde
* @package Date
*/
class Horde_Date_Recurrence
{
/** No Recurrence **/
const RECUR_NONE = 0;
/** Recurs daily. */
const RECUR_DAILY = 1;
/** Recurs weekly. */
const RECUR_WEEKLY = 2;
/** Recurs monthly on the same date. */
const RECUR_MONTHLY_DATE = 3;
/** Recurs monthly on the same week day. */
const RECUR_MONTHLY_WEEKDAY = 4;
/** Recurs yearly on the same date. */
const RECUR_YEARLY_DATE = 5;
/** Recurs yearly on the same day of the year. */
const RECUR_YEARLY_DAY = 6;
/** Recurs yearly on the same week day. */
const RECUR_YEARLY_WEEKDAY = 7;
/**
* The start time of the event.
*
* @var Horde_Date
*/
public $start;
/**
* The end date of the recurrence interval.
*
* @var Horde_Date
*/
public $recurEnd = null;
/**
* The number of recurrences.
*
* @var integer
*/
public $recurCount = null;
/**
* The type of recurrence this event follows. RECUR_* constant.
*
* @var integer
*/
public $recurType = self::RECUR_NONE;
/**
* The length of time between recurrences. The time unit depends on the
* recurrence type.
*
* @var integer
*/
public $recurInterval = 1;
/**
* Any additional recurrence data.
*
* @var integer
*/
public $recurData = null;
/**
* All the exceptions from recurrence for this event.
*
* @var array
*/
public $exceptions = array();
/**
* All the dates this recurrence has been marked as completed.
*
* @var array
*/
public $completions = array();
/**
* Constructor.
*
* @param Horde_Date $start Start of the recurring event.
*/
public function __construct($start)
{
$this->start = new Horde_Date($start);
}
/**
* Resets the class properties.
*/
public function reset()
{
$this->recurEnd = null;
$this->recurCount = null;
$this->recurType = self::RECUR_NONE;
$this->recurInterval = 1;
$this->recurData = null;
$this->exceptions = array();
$this->completions = array();
}
/**
* Checks if this event recurs on a given day of the week.
*
* @param integer $dayMask A mask consisting of Horde_Date::MASK_*
* constants specifying the day(s) to check.
*
* @return boolean True if this event recurs on the given day(s).
*/
public function recurOnDay($dayMask)
{
return ($this->recurData & $dayMask);
}
/**
* Specifies the days this event recurs on.
*
* @param integer $dayMask A mask consisting of Horde_Date::MASK_*
* constants specifying the day(s) to recur on.
*/
public function setRecurOnDay($dayMask)
{
$this->recurData = $dayMask;
}
/**
* Returns the days this event recurs on.
*
* @return integer A mask consisting of Horde_Date::MASK_* constants
* specifying the day(s) this event recurs on.
*/
public function getRecurOnDays()
{
return $this->recurData;
}
/**
* Returns whether this event has a specific recurrence type.
*
* @param integer $recurrence RECUR_* constant of the
* recurrence type to check for.
*
* @return boolean True if the event has the specified recurrence type.
*/
public function hasRecurType($recurrence)
{
return ($recurrence == $this->recurType);
}
/**
* Sets a recurrence type for this event.
*
* @param integer $recurrence A RECUR_* constant.
*/
public function setRecurType($recurrence)
{
$this->recurType = $recurrence;
}
/**
* Returns recurrence type of this event.
*
* @return integer A RECUR_* constant.
*/
public function getRecurType()
{
return $this->recurType;
}
/**
* Returns a description of this event's recurring type.
*
* @return string Human readable recurring type.
*/
public function getRecurName()
{
switch ($this->getRecurType()) {
case self::RECUR_NONE:
return Horde_Date_Translation::t("No recurrence");
case self::RECUR_DAILY:
return Horde_Date_Translation::t("Daily");
case self::RECUR_WEEKLY:
return Horde_Date_Translation::t("Weekly");
case self::RECUR_MONTHLY_DATE:
case self::RECUR_MONTHLY_WEEKDAY:
return Horde_Date_Translation::t("Monthly");
case self::RECUR_YEARLY_DATE:
case self::RECUR_YEARLY_DAY:
case self::RECUR_YEARLY_WEEKDAY:
return Horde_Date_Translation::t("Yearly");
}
}
/**
* Sets the length of time between recurrences of this event.
*
* @param integer $interval The time between recurrences.
*/
public function setRecurInterval($interval)
{
if ($interval > 0) {
$this->recurInterval = $interval;
}
}
/**
* Retrieves the length of time between recurrences of this event.
*
* @return integer The number of seconds between recurrences.
*/
public function getRecurInterval()
{
return $this->recurInterval;
}
/**
* Sets the number of recurrences of this event.
*
* @param integer $count The number of recurrences.
*/
public function setRecurCount($count)
{
if ($count > 0) {
$this->recurCount = (int)$count;
// Recurrence counts and end dates are mutually exclusive.
$this->recurEnd = null;
} else {
$this->recurCount = null;
}
}
/**
* Retrieves the number of recurrences of this event.
*
* @return integer The number recurrences.
*/
public function getRecurCount()
{
return $this->recurCount;
}
/**
* Returns whether this event has a recurrence with a fixed count.
*
* @return boolean True if this recurrence has a fixed count.
*/
public function hasRecurCount()
{
return isset($this->recurCount);
}
/**
* Sets the start date of the recurrence interval.
*
* @param Horde_Date $start The recurrence start.
*/
public function setRecurStart($start)
{
$this->start = clone $start;
}
/**
* Retrieves the start date of the recurrence interval.
*
* @return Horde_Date The recurrence start.
*/
public function getRecurStart()
{
return $this->start;
}
/**
* Sets the end date of the recurrence interval.
*
* @param Horde_Date $end The recurrence end.
*/
public function setRecurEnd($end)
{
if (!empty($end)) {
// Recurrence counts and end dates are mutually exclusive.
$this->recurCount = null;
$this->recurEnd = clone $end;
} else {
$this->recurEnd = $end;
}
}
/**
* Retrieves the end date of the recurrence interval.
*
* @return Horde_Date The recurrence end.
*/
public function getRecurEnd()
{
return $this->recurEnd;
}
/**
* Returns whether this event has a recurrence end.
*
* @return boolean True if this recurrence ends.
*/
public function hasRecurEnd()
{
return isset($this->recurEnd) && isset($this->recurEnd->year) &&
$this->recurEnd->year != 9999;
}
/**
* Finds the next recurrence of this event that's after $afterDate.
*
* @param Horde_Date|string $after Return events after this date.
*
* @return Horde_Date|boolean The date of the next recurrence or false
* if the event does not recur after
* $afterDate.
*/
public function nextRecurrence($after)
{
if (!($after instanceof Horde_Date)) {
$after = new Horde_Date($after);
} else {
$after = clone($after);
}
// Make sure $after and $this->start are in the same TZ
$after->setTimezone($this->start->timezone);
if ($this->start->compareDateTime($after) >= 0) {
return clone $this->start;
}
if ($this->recurInterval == 0) {
return false;
}
switch ($this->getRecurType()) {
case self::RECUR_DAILY:
$diff = $this->start->diff($after);
$recur = ceil($diff / $this->recurInterval);
if ($this->recurCount && $recur >= $this->recurCount) {
return false;
}
$recur *= $this->recurInterval;
$next = $this->start->add(array('day' => $recur));
if ((!$this->hasRecurEnd() ||
$next->compareDateTime($this->recurEnd) <= 0) &&
$next->compareDateTime($after) >= 0) {
return $next;
}
break;
case self::RECUR_WEEKLY:
if (empty($this->recurData)) {
return false;
}
$start_week = Horde_Date_Utils::firstDayOfWeek($this->start->format('W'),
$this->start->year);
$start_week->timezone = $this->start->timezone;
$start_week->hour = $this->start->hour;
$start_week->min = $this->start->min;
$start_week->sec = $this->start->sec;
// Make sure we are not at the ISO-8601 first week of year while
// still in month 12...OR in the ISO-8601 last week of year while
// in month 1 and adjust the year accordingly.
$week = $after->format('W');
if ($week == 1 && $after->month == 12) {
$theYear = $after->year + 1;
} elseif ($week >= 52 && $after->month == 1) {
$theYear = $after->year - 1;
} else {
$theYear = $after->year;
}
$after_week = Horde_Date_Utils::firstDayOfWeek($week, $theYear);
$after_week->timezone = $this->start->timezone;
$after_week_end = clone $after_week;
$after_week_end->mday += 7;
$diff = $start_week->diff($after_week);
$interval = $this->recurInterval * 7;
$repeats = floor($diff / $interval);
if ($diff % $interval < 7) {
$recur = $diff;
} else {
/**
* If the after_week is not in the first week interval the
* search needs to skip ahead a complete interval. The way it is
* calculated here means that an event that occurs every second
* week on Monday and Wednesday with the event actually starting
* on Tuesday or Wednesday will only have one incidence in the
* first week.
*/
$recur = $interval * ($repeats + 1);
}
if ($this->hasRecurCount()) {
$recurrences = 0;
/**
* Correct the number of recurrences by the number of events
* that lay between the start of the start week and the
* recurrence start.
*/
$next = clone $start_week;
while ($next->compareDateTime($this->start) < 0) {
if ($this->recurOnDay((int)pow(2, $next->dayOfWeek()))) {
$recurrences--;
}
++$next->mday;
}
if ($repeats > 0) {
$weekdays = $this->recurData;
$total_recurrences_per_week = 0;
while ($weekdays > 0) {
if ($weekdays % 2) {
$total_recurrences_per_week++;
}
$weekdays = ($weekdays - ($weekdays % 2)) / 2;
}
$recurrences += $total_recurrences_per_week * $repeats;
}
}
$next = clone $start_week;
$next->mday += $recur;
while ($next->compareDateTime($after) < 0 &&
$next->compareDateTime($after_week_end) < 0) {
if ($this->hasRecurCount()
&& $next->compareDateTime($after) < 0
&& $this->recurOnDay((int)pow(2, $next->dayOfWeek()))) {
$recurrences++;
}
++$next->mday;
}
if ($this->hasRecurCount() &&
$recurrences >= $this->recurCount) {
return false;
}
if (!$this->hasRecurEnd() ||
$next->compareDateTime($this->recurEnd) <= 0) {
if ($next->compareDateTime($after_week_end) >= 0) {
return $this->nextRecurrence($after_week_end);
}
while (!$this->recurOnDay((int)pow(2, $next->dayOfWeek())) &&
$next->compareDateTime($after_week_end) < 0) {
++$next->mday;
}
if (!$this->hasRecurEnd() ||
$next->compareDateTime($this->recurEnd) <= 0) {
if ($next->compareDateTime($after_week_end) >= 0) {
return $this->nextRecurrence($after_week_end);
} else {
return $next;
}
}
}
break;
case self::RECUR_MONTHLY_DATE:
$start = clone $this->start;
if ($after->compareDateTime($start) < 0) {
$after = clone $start;
} else {
$after = clone $after;
}
// If we're starting past this month's recurrence of the event,
// look in the next month on the day the event recurs.
if ($after->mday > $start->mday) {
++$after->month;
$after->mday = $start->mday;
}
// Adjust $start to be the first match.
$offset = ($after->month - $start->month) + ($after->year - $start->year) * 12;
$offset = floor(($offset + $this->recurInterval - 1) / $this->recurInterval) * $this->recurInterval;
if ($this->recurCount &&
($offset / $this->recurInterval) >= $this->recurCount) {
return false;
}
$start->month += $offset;
$count = $offset / $this->recurInterval;
do {
if ($this->recurCount &&
$count++ >= $this->recurCount) {
return false;
}
// Bail if we've gone past the end of recurrence.
if ($this->hasRecurEnd() &&
$this->recurEnd->compareDateTime($start) < 0) {
return false;
}
if ($start->isValid()) {
return $start;
}
// If the interval is 12, and the date isn't valid, then we
// need to see if February 29th is an option. If not, then the
// event will _never_ recur, and we need to stop checking to
// avoid an infinite loop.
if ($this->recurInterval == 12 && ($start->month != 2 || $start->mday > 29)) {
return false;
}
// Add the recurrence interval.
$start->month += $this->recurInterval;
} while (true);
break;
case self::RECUR_MONTHLY_WEEKDAY:
// Start with the start date of the event.
$estart = clone $this->start;
// What day of the week, and week of the month, do we recur on?
$nth = ceil($this->start->mday / 7);
$weekday = $estart->dayOfWeek();
// Adjust $estart to be the first candidate.
$offset = ($after->month - $estart->month) + ($after->year - $estart->year) * 12;
$offset = floor(($offset + $this->recurInterval - 1) / $this->recurInterval) * $this->recurInterval;
// Adjust our working date until it's after $after.
$estart->month += $offset - $this->recurInterval;
$count = $offset / $this->recurInterval;
do {
if ($this->recurCount &&
$count++ >= $this->recurCount) {
return false;
}
$estart->month += $this->recurInterval;
$next = clone $estart;
$next->setNthWeekday($weekday, $nth);
if ($next->month != $estart->month) {
// We're already in the next month.
continue;
}
if ($next->compareDateTime($after) < 0) {
// We haven't made it past $after yet, try again.
continue;
}
if ($this->hasRecurEnd() &&
$next->compareDateTime($this->recurEnd) > 0) {
// We've gone past the end of recurrence; we can give up
// now.
return false;
}
// We have a candidate to return.
break;
} while (true);
return $next;
case self::RECUR_YEARLY_DATE:
// Start with the start date of the event.
$estart = clone $this->start;
$after = clone $after;
if ($after->month > $estart->month ||
($after->month == $estart->month && $after->mday > $estart->mday)) {
++$after->year;
$after->month = $estart->month;
$after->mday = $estart->mday;
}
// Seperate case here for February 29th
if ($estart->month == 2 && $estart->mday == 29) {
while (!Horde_Date_Utils::isLeapYear($after->year)) {
++$after->year;
}
}
// Adjust $estart to be the first candidate.
$offset = $after->year - $estart->year;
if ($offset > 0) {
$offset = floor(($offset + $this->recurInterval - 1) / $this->recurInterval) * $this->recurInterval;
$estart->year += $offset;
}
// We've gone past the end of recurrence; give up.
if ($this->recurCount &&
$offset >= $this->recurCount) {
return false;
}
if ($this->hasRecurEnd() &&
$this->recurEnd->compareDateTime($estart) < 0) {
return false;
}
return $estart;
case self::RECUR_YEARLY_DAY:
// Check count first.
$dayofyear = $this->start->dayOfYear();
$count = ($after->year - $this->start->year) / $this->recurInterval + 1;
if ($this->recurCount &&
($count > $this->recurCount ||
($count == $this->recurCount &&
$after->dayOfYear() > $dayofyear))) {
return false;
}
// Start with a rough interval.
$estart = clone $this->start;
$estart->year += floor($count - 1) * $this->recurInterval;
// Now add the difference to the required day of year.
$estart->mday += $dayofyear - $estart->dayOfYear();
// Add an interval if the estimation was wrong.
if ($estart->compareDate($after) < 0) {
$estart->year += $this->recurInterval;
$estart->mday += $dayofyear - $estart->dayOfYear();
}
// We've gone past the end of recurrence; give up.
if ($this->hasRecurEnd() &&
$this->recurEnd->compareDateTime($estart) < 0) {
return false;
}
return $estart;
case self::RECUR_YEARLY_WEEKDAY:
// Start with the start date of the event.
$estart = clone $this->start;
// What day of the week, and week of the month, do we recur on?
$nth = ceil($this->start->mday / 7);
$weekday = $estart->dayOfWeek();
// Adjust $estart to be the first candidate.
$offset = floor(($after->year - $estart->year + $this->recurInterval - 1) / $this->recurInterval) * $this->recurInterval;
// Adjust our working date until it's after $after.
$estart->year += $offset - $this->recurInterval;
$count = $offset / $this->recurInterval;
do {
if ($this->recurCount &&
$count++ >= $this->recurCount) {
return false;
}
$estart->year += $this->recurInterval;
$next = clone $estart;
$next->setNthWeekday($weekday, $nth);
if ($next->compareDateTime($after) < 0) {
// We haven't made it past $after yet, try again.
continue;
}
if ($this->hasRecurEnd() &&
$next->compareDateTime($this->recurEnd) > 0) {
// We've gone past the end of recurrence; we can give up
// now.
return false;
}
// We have a candidate to return.
break;
} while (true);
return $next;
}
// We didn't find anything, the recurType was bad, or something else
// went wrong - return false.
return false;
}
/**
* Returns whether this event has any date that matches the recurrence
* rules and is not an exception.
*
* @return boolean True if an active recurrence exists.
*/
public function hasActiveRecurrence()
{
if (!$this->hasRecurEnd()) {
return true;
}
$next = $this->nextRecurrence(new Horde_Date($this->start));
while (is_object($next)) {
if (!$this->hasException($next->year, $next->month, $next->mday) &&
!$this->hasCompletion($next->year, $next->month, $next->mday)) {
return true;
}
$next = $this->nextRecurrence($next->add(array('day' => 1)));
}
return false;
}
/**
* Returns the next active recurrence.
*
* @param Horde_Date $afterDate Return events after this date.
*
* @return Horde_Date|boolean The date of the next active
* recurrence or false if the event
* has no active recurrence after
* $afterDate.
*/
public function nextActiveRecurrence($afterDate)
{
$next = $this->nextRecurrence($afterDate);
while (is_object($next)) {
if (!$this->hasException($next->year, $next->month, $next->mday) &&
!$this->hasCompletion($next->year, $next->month, $next->mday)) {
return $next;
}
$next->mday++;
$next = $this->nextRecurrence($next);
}
return false;
}
/**
* Adds an exception to a recurring event.
*
* @param integer $year The year of the exception.
* @param integer $month The month of the exception.
* @param integer $mday The day of the month of the exception.
*/
public function addException($year, $month, $mday)
{
$key = sprintf('%04d%02d%02d', $year, $month, $mday);
if (array_search($key, $this->exceptions) === false) {
$this->exceptions[] = sprintf('%04d%02d%02d', $year, $month, $mday);
}
}
/**
* Deletes an exception from a recurring event.
*
* @param integer $year The year of the exception.
* @param integer $month The month of the exception.
* @param integer $mday The day of the month of the exception.
*/
public function deleteException($year, $month, $mday)
{
$key = array_search(sprintf('%04d%02d%02d', $year, $month, $mday), $this->exceptions);
if ($key !== false) {
unset($this->exceptions[$key]);
}
}
/**
* Checks if an exception exists for a given reccurence of an event.
*
* @param integer $year The year of the reucrance.
* @param integer $month The month of the reucrance.
* @param integer $mday The day of the month of the reucrance.
*
* @return boolean True if an exception exists for the given date.
*/
public function hasException($year, $month, $mday)
{
return in_array(sprintf('%04d%02d%02d', $year, $month, $mday),
$this->getExceptions());
}
/**
* Retrieves all the exceptions for this event.
*
* @return array Array containing the dates of all the exceptions in
* YYYYMMDD form.
*/
public function getExceptions()
{
return $this->exceptions;
}
/**
* Adds a completion to a recurring event.
*
* @param integer $year The year of the exception.
* @param integer $month The month of the exception.
* @param integer $mday The day of the month of the completion.
*/
public function addCompletion($year, $month, $mday)
{
$this->completions[] = sprintf('%04d%02d%02d', $year, $month, $mday);
}
/**
* Deletes a completion from a recurring event.
*
* @param integer $year The year of the exception.
* @param integer $month The month of the exception.
* @param integer $mday The day of the month of the completion.
*/
public function deleteCompletion($year, $month, $mday)
{
$key = array_search(sprintf('%04d%02d%02d', $year, $month, $mday), $this->completions);
if ($key !== false) {
unset($this->completions[$key]);
}
}
/**
* Checks if a completion exists for a given reccurence of an event.
*
* @param integer $year The year of the recurrance.
* @param integer $month The month of the recurrance.
* @param integer $mday The day of the month of the recurrance.
*
* @return boolean True if a completion exists for the given date.
*/
public function hasCompletion($year, $month, $mday)
{
return in_array(sprintf('%04d%02d%02d', $year, $month, $mday),
$this->getCompletions());
}
/**
* Retrieves all the completions for this event.
*
* @return array Array containing the dates of all the completions in
* YYYYMMDD form.
*/
public function getCompletions()
{
return $this->completions;
}
/**
* Parses a vCalendar 1.0 recurrence rule.
*
* @link http://www.imc.org/pdi/vcal-10.txt
* @link http://www.shuchow.com/vCalAddendum.html
*
* @param string $rrule A vCalendar 1.0 conform RRULE value.
*/
public function fromRRule10($rrule)
{
$this->reset();
if (!$rrule) {
return;
}
if (!preg_match('/([A-Z]+)(\d+)?(.*)/', $rrule, $matches)) {
// No recurrence data - event does not recur.
$this->setRecurType(self::RECUR_NONE);
}
// Always default the recurInterval to 1.
$this->setRecurInterval(!empty($matches[2]) ? $matches[2] : 1);
$remainder = trim($matches[3]);
switch ($matches[1]) {
case 'D':
$this->setRecurType(self::RECUR_DAILY);
break;
case 'W':
$this->setRecurType(self::RECUR_WEEKLY);
if (!empty($remainder)) {
$maskdays = array(
'SU' => Horde_Date::MASK_SUNDAY,
'MO' => Horde_Date::MASK_MONDAY,
'TU' => Horde_Date::MASK_TUESDAY,
'WE' => Horde_Date::MASK_WEDNESDAY,
'TH' => Horde_Date::MASK_THURSDAY,
'FR' => Horde_Date::MASK_FRIDAY,
'SA' => Horde_Date::MASK_SATURDAY,
);
$mask = 0;
while (preg_match('/^ ?[A-Z]{2} ?/', $remainder, $matches)) {
$day = trim($matches[0]);
$remainder = substr($remainder, strlen($matches[0]));
$mask |= $maskdays[$day];
}
$this->setRecurOnDay($mask);
} else {
// Recur on the day of the week of the original recurrence.
$maskdays = array(
Horde_Date::DATE_SUNDAY => Horde_Date::MASK_SUNDAY,
Horde_Date::DATE_MONDAY => Horde_Date::MASK_MONDAY,
Horde_Date::DATE_TUESDAY => Horde_Date::MASK_TUESDAY,
Horde_Date::DATE_WEDNESDAY => Horde_Date::MASK_WEDNESDAY,
Horde_Date::DATE_THURSDAY => Horde_Date::MASK_THURSDAY,
Horde_Date::DATE_FRIDAY => Horde_Date::MASK_FRIDAY,
Horde_Date::DATE_SATURDAY => Horde_Date::MASK_SATURDAY,
);
$this->setRecurOnDay($maskdays[$this->start->dayOfWeek()]);
}
break;
case 'MP':
$this->setRecurType(self::RECUR_MONTHLY_WEEKDAY);
break;
case 'MD':
$this->setRecurType(self::RECUR_MONTHLY_DATE);
break;
case 'YM':
$this->setRecurType(self::RECUR_YEARLY_DATE);
break;
case 'YD':
$this->setRecurType(self::RECUR_YEARLY_DAY);
break;
}
// We don't support modifiers at the moment, strip them.
while ($remainder && !preg_match('/^(#\d+|\d{8})($| |T\d{6})/', $remainder)) {
$remainder = substr($remainder, 1);
}
if (!empty($remainder)) {
if (strpos($remainder, '#') === 0) {
$this->setRecurCount(substr($remainder, 1));
} else {
list($year, $month, $mday, $hour, $min, $sec, $tz) =
sscanf($remainder, '%04d%02d%02dT%02d%02d%02d%s');
$this->setRecurEnd(new Horde_Date(array('year' => $year,
'month' => $month,
'mday' => $mday,
'hour' => $hour,
'min' => $min,
'sec' => $sec),
$tz == 'Z' ? 'UTC' : $this->start->timezone));
}
}
}
/**
* Creates a vCalendar 1.0 recurrence rule.
*
* @link http://www.imc.org/pdi/vcal-10.txt
* @link http://www.shuchow.com/vCalAddendum.html
*
* @param Horde_Icalendar $calendar A Horde_Icalendar object instance.
*
* @return string A vCalendar 1.0 conform RRULE value.
*/
public function toRRule10($calendar)
{
switch ($this->recurType) {
case self::RECUR_NONE:
return '';
case self::RECUR_DAILY:
$rrule = 'D' . $this->recurInterval;
break;
case self::RECUR_WEEKLY:
$rrule = 'W' . $this->recurInterval;
$vcaldays = array('SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA');
for ($i = 0; $i <= 7; ++$i) {
if ($this->recurOnDay(pow(2, $i))) {
$rrule .= ' ' . $vcaldays[$i];
}
}
break;
case self::RECUR_MONTHLY_DATE:
$rrule = 'MD' . $this->recurInterval . ' ' . trim($this->start->mday);
break;
case self::RECUR_MONTHLY_WEEKDAY:
$nth_weekday = (int)($this->start->mday / 7);
if (($this->start->mday % 7) > 0) {
$nth_weekday++;
}
$vcaldays = array('SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA');
$rrule = 'MP' . $this->recurInterval . ' ' . $nth_weekday . '+ ' . $vcaldays[$this->start->dayOfWeek()];
break;
case self::RECUR_YEARLY_DATE:
$rrule = 'YM' . $this->recurInterval . ' ' . trim($this->start->month);
break;
case self::RECUR_YEARLY_DAY:
$rrule = 'YD' . $this->recurInterval . ' ' . $this->start->dayOfYear();
break;
default:
return '';
}
if ($this->hasRecurEnd()) {
$recurEnd = clone $this->recurEnd;
return $rrule . ' ' . $calendar->_exportDateTime($recurEnd);
}
return $rrule . ' #' . (int)$this->getRecurCount();
}
/**
* Parses an iCalendar 2.0 recurrence rule.
*
* @link http://rfc.net/rfc2445.html#s4.3.10
* @link http://rfc.net/rfc2445.html#s4.8.5
* @link http://www.shuchow.com/vCalAddendum.html
*
* @param string $rrule An iCalendar 2.0 conform RRULE value.
*/
public function fromRRule20($rrule)
{
$this->reset();
// Parse the recurrence rule into keys and values.
$rdata = array();
$parts = explode(';', $rrule);
foreach ($parts as $part) {
list($key, $value) = explode('=', $part, 2);
$rdata[Horde_String::upper($key)] = $value;
}
if (isset($rdata['FREQ'])) {
// Always default the recurInterval to 1.
$this->setRecurInterval(isset($rdata['INTERVAL']) ? $rdata['INTERVAL'] : 1);
switch (Horde_String::upper($rdata['FREQ'])) {
case 'DAILY':
$this->setRecurType(self::RECUR_DAILY);
break;
case 'WEEKLY':
$this->setRecurType(self::RECUR_WEEKLY);
if (isset($rdata['BYDAY'])) {
$maskdays = array(
'SU' => Horde_Date::MASK_SUNDAY,
'MO' => Horde_Date::MASK_MONDAY,
'TU' => Horde_Date::MASK_TUESDAY,
'WE' => Horde_Date::MASK_WEDNESDAY,
'TH' => Horde_Date::MASK_THURSDAY,
'FR' => Horde_Date::MASK_FRIDAY,
'SA' => Horde_Date::MASK_SATURDAY,
);
$days = explode(',', $rdata['BYDAY']);
$mask = 0;
foreach ($days as $day) {
$mask |= $maskdays[$day];
}
$this->setRecurOnDay($mask);
} else {
// Recur on the day of the week of the original
// recurrence.
$maskdays = array(
Horde_Date::DATE_SUNDAY => Horde_Date::MASK_SUNDAY,
Horde_Date::DATE_MONDAY => Horde_Date::MASK_MONDAY,
Horde_Date::DATE_TUESDAY => Horde_Date::MASK_TUESDAY,
Horde_Date::DATE_WEDNESDAY => Horde_Date::MASK_WEDNESDAY,
Horde_Date::DATE_THURSDAY => Horde_Date::MASK_THURSDAY,
Horde_Date::DATE_FRIDAY => Horde_Date::MASK_FRIDAY,
Horde_Date::DATE_SATURDAY => Horde_Date::MASK_SATURDAY);
$this->setRecurOnDay($maskdays[$this->start->dayOfWeek()]);
}
break;
case 'MONTHLY':
if (isset($rdata['BYDAY'])) {
$this->setRecurType(self::RECUR_MONTHLY_WEEKDAY);
} else {
$this->setRecurType(self::RECUR_MONTHLY_DATE);
}
break;
case 'YEARLY':
if (isset($rdata['BYYEARDAY'])) {
$this->setRecurType(self::RECUR_YEARLY_DAY);
} elseif (isset($rdata['BYDAY'])) {
$this->setRecurType(self::RECUR_YEARLY_WEEKDAY);
} else {
$this->setRecurType(self::RECUR_YEARLY_DATE);
}
break;
}
if (isset($rdata['UNTIL'])) {
list($year, $month, $mday) = sscanf($rdata['UNTIL'],
'%04d%02d%02d');
$this->setRecurEnd(new Horde_Date(array('year' => $year,
'month' => $month,
'mday' => $mday),
$this->start->timezone));
}
if (isset($rdata['COUNT'])) {
$this->setRecurCount($rdata['COUNT']);
}
} else {
// No recurrence data - event does not recur.
$this->setRecurType(self::RECUR_NONE);
}
}
/**
* Creates an iCalendar 2.0 recurrence rule.
*
* @link http://rfc.net/rfc2445.html#s4.3.10
* @link http://rfc.net/rfc2445.html#s4.8.5
* @link http://www.shuchow.com/vCalAddendum.html
*
* @param Horde_Icalendar $calendar A Horde_Icalendar object instance.
*
* @return string An iCalendar 2.0 conform RRULE value.
*/
public function toRRule20($calendar)
{
switch ($this->recurType) {
case self::RECUR_NONE:
return '';
case self::RECUR_DAILY:
$rrule = 'FREQ=DAILY;INTERVAL=' . $this->recurInterval;
break;
case self::RECUR_WEEKLY:
$rrule = 'FREQ=WEEKLY;INTERVAL=' . $this->recurInterval;
$vcaldays = array('SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA');
for ($i = $flag = 0; $i <= 7; ++$i) {
if ($this->recurOnDay(pow(2, $i))) {
if ($flag == 0) {
$rrule .= ';BYDAY=';
$flag = 1;
} else {
$rrule .= ',';
}
$rrule .= $vcaldays[$i];
}
}
break;
case self::RECUR_MONTHLY_DATE:
$rrule = 'FREQ=MONTHLY;INTERVAL=' . $this->recurInterval;
break;
case self::RECUR_MONTHLY_WEEKDAY:
$nth_weekday = (int)($this->start->mday / 7);
if (($this->start->mday % 7) > 0) {
$nth_weekday++;
}
$vcaldays = array('SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA');
$rrule = 'FREQ=MONTHLY;INTERVAL=' . $this->recurInterval
. ';BYDAY=' . $nth_weekday . $vcaldays[$this->start->dayOfWeek()];
break;
case self::RECUR_YEARLY_DATE:
$rrule = 'FREQ=YEARLY;INTERVAL=' . $this->recurInterval;
break;
case self::RECUR_YEARLY_DAY:
$rrule = 'FREQ=YEARLY;INTERVAL=' . $this->recurInterval
. ';BYYEARDAY=' . $this->start->dayOfYear();
break;
case self::RECUR_YEARLY_WEEKDAY:
$nth_weekday = (int)($this->start->mday / 7);
if (($this->start->mday % 7) > 0) {
$nth_weekday++;
}
$vcaldays = array('SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA');
$rrule = 'FREQ=YEARLY;INTERVAL=' . $this->recurInterval
. ';BYDAY='
. $nth_weekday
. $vcaldays[$this->start->dayOfWeek()]
. ';BYMONTH=' . $this->start->month;
break;
}
if ($this->hasRecurEnd()) {
$recurEnd = clone $this->recurEnd;
$rrule .= ';UNTIL=' . $calendar->_exportDateTime($recurEnd);
}
if ($count = $this->getRecurCount()) {
$rrule .= ';COUNT=' . $count;
}
return $rrule;
}
/**
* Parses the recurrence data from a Kolab hash.
*
* @param array $hash The hash to convert.
*
* @return boolean True if the hash seemed valid, false otherwise.
*/
public function fromKolab($hash)
{
$this->reset();
if (!isset($hash['interval']) || !isset($hash['cycle'])) {
$this->setRecurType(self::RECUR_NONE);
return false;
}
$this->setRecurInterval((int)$hash['interval']);
$parse_day = false;
$set_daymask = false;
$update_month = false;
$update_daynumber = false;
$update_weekday = false;
$nth_weekday = -1;
switch ($hash['cycle']) {
case 'daily':
$this->setRecurType(self::RECUR_DAILY);
break;
case 'weekly':
$this->setRecurType(self::RECUR_WEEKLY);
$parse_day = true;
$set_daymask = true;
break;
case 'monthly':
if (!isset($hash['daynumber'])) {
$this->setRecurType(self::RECUR_NONE);
return false;
}
switch ($hash['type']) {
case 'daynumber':
$this->setRecurType(self::RECUR_MONTHLY_DATE);
$update_daynumber = true;
break;
case 'weekday':
$this->setRecurType(self::RECUR_MONTHLY_WEEKDAY);
$nth_weekday = (int)$hash['daynumber'];
$hash['daynumber'] = 1;
$parse_day = true;
$update_daynumber = true;
$update_weekday = true;
break;
}
break;
case 'yearly':
if (!isset($hash['type'])) {
$this->setRecurType(self::RECUR_NONE);
return false;
}
switch ($hash['type']) {
case 'monthday':
$this->setRecurType(self::RECUR_YEARLY_DATE);
$update_month = true;
$update_daynumber = true;
break;
case 'yearday':
if (!isset($hash['daynumber'])) {
$this->setRecurType(self::RECUR_NONE);
return false;
}
$this->setRecurType(self::RECUR_YEARLY_DAY);
// Start counting days in January.
$hash['month'] = 'january';
$update_month = true;
$update_daynumber = true;
break;
case 'weekday':
if (!isset($hash['daynumber'])) {
$this->setRecurType(self::RECUR_NONE);
return false;
}
$this->setRecurType(self::RECUR_YEARLY_WEEKDAY);
$nth_weekday = (int)$hash['daynumber'];
$hash['daynumber'] = 1;
$parse_day = true;
$update_month = true;
$update_daynumber = true;
$update_weekday = true;
break;
}
}
if (isset($hash['range-type']) && isset($hash['range'])) {
switch ($hash['range-type']) {
case 'number':
$this->setRecurCount((int)$hash['range']);
break;
case 'date':
$recur_end = new Horde_Date($hash['range']);
$recur_end->hour = 23;
$recur_end->min = 59;
$recur_end->sec = 59;
$this->setRecurEnd($recur_end);
break;
}
}
// Need to parse ?
$last_found_day = -1;
if ($parse_day) {
if (!isset($hash['day'])) {
$this->setRecurType(self::RECUR_NONE);
return false;
}
$mask = 0;
$bits = array(
'monday' => Horde_Date::MASK_MONDAY,
'tuesday' => Horde_Date::MASK_TUESDAY,
'wednesday' => Horde_Date::MASK_WEDNESDAY,
'thursday' => Horde_Date::MASK_THURSDAY,
'friday' => Horde_Date::MASK_FRIDAY,
'saturday' => Horde_Date::MASK_SATURDAY,
'sunday' => Horde_Date::MASK_SUNDAY,
);
$days = array(
'monday' => Horde_Date::DATE_MONDAY,
'tuesday' => Horde_Date::DATE_TUESDAY,
'wednesday' => Horde_Date::DATE_WEDNESDAY,
'thursday' => Horde_Date::DATE_THURSDAY,
'friday' => Horde_Date::DATE_FRIDAY,
'saturday' => Horde_Date::DATE_SATURDAY,
'sunday' => Horde_Date::DATE_SUNDAY,
);
foreach ($hash['day'] as $day) {
// Validity check.
if (empty($day) || !isset($bits[$day])) {
continue;
}
$mask |= $bits[$day];
$last_found_day = $days[$day];
}
if ($set_daymask) {
$this->setRecurOnDay($mask);
}
}
if ($update_month || $update_daynumber || $update_weekday) {
if ($update_month) {
$month2number = array(
'january' => 1,
'february' => 2,
'march' => 3,
'april' => 4,
'may' => 5,
'june' => 6,
'july' => 7,
'august' => 8,
'september' => 9,
'october' => 10,
'november' => 11,
'december' => 12,
);
if (isset($month2number[$hash['month']])) {
$this->start->month = $month2number[$hash['month']];
}
}
if ($update_daynumber) {
if (!isset($hash['daynumber'])) {
$this->setRecurType(self::RECUR_NONE);
return false;
}
$this->start->mday = $hash['daynumber'];
}
if ($update_weekday) {
$this->start->setNthWeekday($last_found_day, $nth_weekday);
}
}
// Exceptions.
if (isset($hash['exclusion'])) {
foreach ($hash['exclusion'] as $exception) {
if ($exception instanceof DateTime) {
$this->exceptions[] = $exception->format('Ymd');
}
}
}
if (isset($hash['complete'])) {
foreach ($hash['complete'] as $completion) {
if ($exception instanceof DateTime) {
$this->completions[] = $completion->format('Ymd');
}
}
}
return true;
}
/**
* Export this object into a Kolab hash.
*
* @return array The recurrence hash.
*/
public function toKolab()
{
if ($this->getRecurType() == self::RECUR_NONE) {
return array();
}
$day2number = array(
0 => 'sunday',
1 => 'monday',
2 => 'tuesday',
3 => 'wednesday',
4 => 'thursday',
5 => 'friday',
6 => 'saturday'
);
$month2number = array(
1 => 'january',
2 => 'february',
3 => 'march',
4 => 'april',
5 => 'may',
6 => 'june',
7 => 'july',
8 => 'august',
9 => 'september',
10 => 'october',
11 => 'november',
12 => 'december'
);
$hash = array('interval' => $this->getRecurInterval());
$start = $this->getRecurStart();
switch ($this->getRecurType()) {
case self::RECUR_DAILY:
$hash['cycle'] = 'daily';
break;
case self::RECUR_WEEKLY:
$hash['cycle'] = 'weekly';
$bits = array(
'monday' => Horde_Date::MASK_MONDAY,
'tuesday' => Horde_Date::MASK_TUESDAY,
'wednesday' => Horde_Date::MASK_WEDNESDAY,
'thursday' => Horde_Date::MASK_THURSDAY,
'friday' => Horde_Date::MASK_FRIDAY,
'saturday' => Horde_Date::MASK_SATURDAY,
'sunday' => Horde_Date::MASK_SUNDAY,
);
$days = array();
foreach ($bits as $name => $bit) {
if ($this->recurOnDay($bit)) {
$days[] = $name;
}
}
$hash['day'] = $days;
break;
case self::RECUR_MONTHLY_DATE:
$hash['cycle'] = 'monthly';
$hash['type'] = 'daynumber';
$hash['daynumber'] = $start->mday;
break;
case self::RECUR_MONTHLY_WEEKDAY:
$hash['cycle'] = 'monthly';
$hash['type'] = 'weekday';
$hash['daynumber'] = $start->weekOfMonth();
$hash['day'] = array ($day2number[$start->dayOfWeek()]);
break;
case self::RECUR_YEARLY_DATE:
$hash['cycle'] = 'yearly';
$hash['type'] = 'monthday';
$hash['daynumber'] = $start->mday;
$hash['month'] = $month2number[$start->month];
break;
case self::RECUR_YEARLY_DAY:
$hash['cycle'] = 'yearly';
$hash['type'] = 'yearday';
$hash['daynumber'] = $start->dayOfYear();
break;
case self::RECUR_YEARLY_WEEKDAY:
$hash['cycle'] = 'yearly';
$hash['type'] = 'weekday';
$hash['daynumber'] = $start->weekOfMonth();
$hash['day'] = array ($day2number[$start->dayOfWeek()]);
$hash['month'] = $month2number[$start->month];
}
if ($this->hasRecurCount()) {
$hash['range-type'] = 'number';
$hash['range'] = $this->getRecurCount();
} elseif ($this->hasRecurEnd()) {
$date = $this->getRecurEnd();
$hash['range-type'] = 'date';
$hash['range'] = $date->toDateTime();
} else {
$hash['range-type'] = 'none';
$hash['range'] = '';
}
// Recurrence exceptions
$hash['exclusion'] = $hash['complete'] = array();
foreach ($this->exceptions as $exception) {
$hash['exclusion'][] = new DateTime($exception);
}
foreach ($this->completions as $completionexception) {
$hash['complete'][] = new DateTime($completionexception);
}
return $hash;
}
/**
* Returns a simple object suitable for json transport representing this
* object.
*
* Possible properties are:
* - t: type
* - i: interval
* - e: end date
* - c: count
* - d: data
* - co: completions
* - ex: exceptions
*
* @return object A simple object.
*/
public function toJson()
{
$json = new stdClass;
$json->t = $this->recurType;
$json->i = $this->recurInterval;
if ($this->hasRecurEnd()) {
$json->e = $this->recurEnd->toJson();
}
if ($this->recurCount) {
$json->c = $this->recurCount;
}
if ($this->recurData) {
$json->d = $this->recurData;
}
if ($this->completions) {
$json->co = $this->completions;
}
if ($this->exceptions) {
$json->ex = $this->exceptions;
}
return $json;
}
}
Horde_Date-2.0.7/lib/Horde/Date/Repeater.php 0000664 0001750 0001750 00000002637 12227212717 016601 0 ustar jan jan now)) {
throw new Horde_Date_Repeater_Exception('Start point must be set before calling next()');
}
if (!in_array($pointer, array('future', 'none', 'past'))) {
throw new Horde_Date_Repeater_Exception("First argument 'pointer' must be one of 'past', 'future', 'none'");
}
}
public function this($pointer = 'future')
{
if (is_null($this->now)) {
throw new Horde_Date_Repeater_Exception('Start point must be set before calling this()');
}
if (!in_array($pointer, array('future', 'none', 'past'))) {
throw new Horde_Date_Repeater_Exception("First argument 'pointer' must be one of 'past', 'future', 'none'");
}
}
public function __toString()
{
return 'repeater';
}
}
Horde_Date-2.0.7/lib/Horde/Date/Span.php 0000664 0001750 0001750 00000004113 12227212717 015722 0 ustar jan jan
* @category Horde
* @package Date
*/
class Horde_Date_Span
{
/**
* @var Horde_Date
*/
public $begin;
/**
* @var Horde_Date
*/
public $end;
/**
* Constructor.
*
* @param mixed $begin Horde_Date or other format accepted by the
* Horde_Date constructor.
* @param mixed $end Horde_Date or other format accepted by the
* Horde_Date constructor.
*/
public function __construct($begin, $end)
{
if (!($begin instanceof Horde_Date)) {
$begin = new Horde_Date($begin);
}
if (!($end instanceof Horde_Date)) {
$end = new Horde_Date($end);
}
$this->begin = $begin;
$this->end = $end;
}
/**
* Returns the width of this span in seconds.
*/
public function width()
{
return abs($this->end->timestamp() - $this->begin->timestamp());
}
/**
* Is a Horde_Date within this span?
*
* @param Horde_Date $date
*/
public function includes($date)
{
return ($this->begin->compareDateTime($date) <= 0) && ($this->end->compareDateTime($date) >= 0);
}
/**
* Add a number of seconds to this span, returning the new span
*/
public function add($factor)
{
return new Horde_Date_Span($this->begin->add($factor), $this->end->add($factor));
}
/**
* Subtract a number of seconds from this span, returning the new span.
*/
public function sub($factor)
{
return new Horde_Date_Span($this->begin->sub($factor), $this->end->sub($factor));
}
public function __toString()
{
return '(' . $this->begin . '..' . $this->end . ')';
}
}
Horde_Date-2.0.7/lib/Horde/Date/Translation.php 0000664 0001750 0001750 00000003201 12227212717 017314 0 ustar jan jan
* @package Date
*/
class Horde_Date_Translation extends Horde_Translation
{
/**
* Returns the translation of a message.
*
* @var string $message The string to translate.
*
* @return string The string translation, or the original string if no
* translation exists.
*/
static public function t($message)
{
self::$_domain = 'Horde_Date';
self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? __DIR__ . '/../../../locale' : '@data_dir@/Horde_Date/locale';
return parent::t($message);
}
/**
* Returns the plural translation of a message.
*
* @param string $singular The singular version to translate.
* @param string $plural The plural version to translate.
* @param integer $number The number that determines singular vs. plural.
*
* @return string The string translation, or the original string if no
* translation exists.
*/
static public function ngettext($singular, $plural, $number)
{
self::$_domain = 'Horde_Date';
self::$_directory = '@data_dir@' == '@'.'data_dir'.'@' ? __DIR__ . '/../../../locale' : '@data_dir@/Horde_Date/locale';
return parent::ngettext($singular, $plural, $number);
}
}
Horde_Date-2.0.7/lib/Horde/Date/Utils.php 0000664 0001750 0001750 00000012442 12227212717 016125 0 ustar jan jan format('t');
}
return $cache[$year][$month];
}
/**
* Returns a relative, natural language representation of a timestamp
*
* @todo Wider range of values ... maybe future time as well?
* @todo Support minimum resolution parameter.
*
* @param mixed $time The time. Any format accepted by Horde_Date.
* @param string $date_format Format to display date if timestamp is
* more then 1 day old.
* @param string $time_format Format to display time if timestamp is 1
* day old.
*
* @return string The relative time (i.e. 2 minutes ago)
*/
public static function relativeDateTime($time, $date_format = '%x',
$time_format = '%X')
{
$date = new Horde_Date($time);
$delta = time() - $date->timestamp();
if ($delta < 60) {
return sprintf(Horde_Date_Translation::ngettext("%d second ago", "%d seconds ago", $delta), $delta);
}
$delta = round($delta / 60);
if ($delta < 60) {
return sprintf(Horde_Date_Translation::ngettext("%d minute ago", "%d minutes ago", $delta), $delta);
}
$delta = round($delta / 60);
if ($delta < 24) {
return sprintf(Horde_Date_Translation::ngettext("%d hour ago", "%d hours ago", $delta), $delta);
}
if ($delta > 24 && $delta < 48) {
$date = new Horde_Date($time);
return sprintf(Horde_Date_Translation::t("yesterday at %s"), $date->strftime($time_format));
}
$delta = round($delta / 24);
if ($delta < 7) {
return sprintf(Horde_Date_Translation::t("%d days ago"), $delta);
}
if (round($delta / 7) < 5) {
$delta = round($delta / 7);
return sprintf(Horde_Date_Translation::ngettext("%d week ago", "%d weeks ago", $delta), $delta);
}
// Default to the user specified date format.
return $date->strftime($date_format);
}
/**
* Tries to convert strftime() formatters to date() formatters.
*
* Unsupported formatters will be removed.
*
* @param string $format A strftime() formatting string.
*
* @return string A date() formatting string.
*/
public static function strftime2date($format)
{
$replace = array(
'/%a/' => 'D',
'/%A/' => 'l',
'/%d/' => 'd',
'/%e/' => 'j',
'/%j/' => 'z',
'/%u/' => 'N',
'/%w/' => 'w',
'/%U/' => '',
'/%V/' => 'W',
'/%W/' => '',
'/%b/' => 'M',
'/%B/' => 'F',
'/%h/' => 'M',
'/%m/' => 'm',
'/%C/' => '',
'/%g/' => '',
'/%G/' => 'o',
'/%y/' => 'y',
'/%Y/' => 'Y',
'/%H/' => 'H',
'/%I/' => 'h',
'/%i/' => 'g',
'/%M/' => 'i',
'/%p/' => 'A',
'/%P/' => 'a',
'/%r/' => 'h:i:s A',
'/%R/' => 'H:i',
'/%S/' => 's',
'/%T/' => 'H:i:s',
'/%X/e' => 'Horde_Date_Utils::strftime2date(Horde_Nls::getLangInfo(T_FMT))',
'/%z/' => 'O',
'/%Z/' => '',
'/%c/' => '',
'/%D/' => 'm/d/y',
'/%F/' => 'Y-m-d',
'/%s/' => 'U',
'/%x/e' => 'Horde_Date_Utils::strftime2date(Horde_Nls::getLangInfo(D_FMT))',
'/%n/' => "\n",
'/%t/' => "\t",
'/%%/' => '%'
);
return preg_replace(array_keys($replace), array_values($replace), $format);
}
}
Horde_Date-2.0.7/lib/Horde/Date.php 0000664 0001750 0001750 00000106025 12227212717 015026 0 ustar jan jan self::MASK_YEAR,
'month' => self::MASK_MONTH,
'mday' => self::MASK_DAY,
'hour' => self::MASK_HOUR,
'min' => self::MASK_MINUTE,
'sec' => self::MASK_SECOND,
);
protected $_formatCache = array();
/**
* Builds a new date object. If $date contains date parts, use them to
* initialize the object.
*
* Recognized formats:
* - arrays with keys 'year', 'month', 'mday', 'day'
* 'hour', 'min', 'minute', 'sec'
* - objects with properties 'year', 'month', 'mday', 'hour', 'min', 'sec'
* - yyyy-mm-dd hh:mm:ss
* - yyyymmddhhmmss
* - yyyymmddThhmmssZ
* - yyyymmdd (might conflict with unix timestamps between 31 Oct 1966 and
* 03 Mar 1973)
* - unix timestamps
* - anything parsed by strtotime()/DateTime.
*
* @throws Horde_Date_Exception
*/
public function __construct($date = null, $timezone = null)
{
if (!self::$_supportedSpecs) {
self::$_supportedSpecs = self::$_defaultSpecs;
if (function_exists('nl_langinfo')) {
self::$_supportedSpecs .= 'bBpxX';
}
}
if (func_num_args() > 2) {
// Handle args in order: year month day hour min sec tz
$this->_initializeFromArgs(func_get_args());
return;
}
$this->_initializeTimezone($timezone);
if (is_null($date)) {
return;
}
if (is_string($date)) {
$date = trim($date, '"');
}
if (is_object($date)) {
$this->_initializeFromObject($date);
} elseif (is_array($date)) {
$this->_initializeFromArray($date);
} elseif (preg_match('/^(\d{4})-?(\d{2})-?(\d{2})T? ?(\d{2}):?(\d{2}):?(\d{2})(?:\.\d+)?(Z?)$/', $date, $parts)) {
$this->_year = (int)$parts[1];
$this->_month = (int)$parts[2];
$this->_mday = (int)$parts[3];
$this->_hour = (int)$parts[4];
$this->_min = (int)$parts[5];
$this->_sec = (int)$parts[6];
if ($parts[7]) {
$this->_initializeTimezone('UTC');
}
} elseif (preg_match('/^(\d{4})-?(\d{2})-?(\d{2})$/', $date, $parts) &&
$parts[2] > 0 && $parts[2] <= 12 &&
$parts[3] > 0 && $parts[3] <= 31) {
$this->_year = (int)$parts[1];
$this->_month = (int)$parts[2];
$this->_mday = (int)$parts[3];
$this->_hour = $this->_min = $this->_sec = 0;
} elseif ((string)(int)$date == $date) {
// Try as a timestamp.
$parts = @getdate($date);
if ($parts) {
$this->_year = $parts['year'];
$this->_month = $parts['mon'];
$this->_mday = $parts['mday'];
$this->_hour = $parts['hours'];
$this->_min = $parts['minutes'];
$this->_sec = $parts['seconds'];
}
} else {
try {
$parsed = new DateTime($date);
} catch (Exception $e) {
throw new Horde_Date_Exception(sprintf(Horde_Date_Translation::t("Failed to parse time string (%s)"), $date));
}
$parsed->setTimezone(new DateTimeZone(date_default_timezone_get()));
$this->_year = (int)$parsed->format('Y');
$this->_month = (int)$parsed->format('m');
$this->_mday = (int)$parsed->format('d');
$this->_hour = (int)$parsed->format('H');
$this->_min = (int)$parsed->format('i');
$this->_sec = (int)$parsed->format('s');
$this->_initializeTimezone(date_default_timezone_get());
}
}
/**
* Returns a simple string representation of the date object
*
* @return string This object converted to a string.
*/
public function __toString()
{
try {
return $this->format($this->_defaultFormat);
} catch (Exception $e) {
return '';
}
}
/**
* Returns a DateTime object representing this object.
*
* @return DateTime
*/
public function toDateTime()
{
try {
$date = new DateTime(null, new DateTimeZone($this->_timezone));
$date->setDate($this->_year, $this->_month, $this->_mday);
$date->setTime($this->_hour, $this->_min, $this->_sec);
} catch (Exception $e) {
throw new Horde_Date_Exception($e);
}
return $date;
}
/**
* Converts a date in the proleptic Gregorian calendar to the no of days
* since 24th November, 4714 B.C.
*
* Returns the no of days since Monday, 24th November, 4714 B.C. in the
* proleptic Gregorian calendar (which is 24th November, -4713 using
* 'Astronomical' year numbering, and 1st January, 4713 B.C. in the
* proleptic Julian calendar). This is also the first day of the 'Julian
* Period' proposed by Joseph Scaliger in 1583, and the number of days
* since this date is known as the 'Julian Day'. (It is not directly
* to do with the Julian calendar, although this is where the name
* is derived from.)
*
* The algorithm is valid for all years (positive and negative), and
* also for years preceding 4714 B.C.
*
* Algorithm is from PEAR::Date_Calc
*
* @author Monte Ohrt
* @author Pierre-Alain Joye
* @author Daniel Convissor
* @author C.A. Woodcock
*
* @return integer The number of days since 24th November, 4714 B.C.
*/
public function toDays()
{
if (function_exists('GregorianToJD')) {
return gregoriantojd($this->_month, $this->_mday, $this->_year);
}
$day = $this->_mday;
$month = $this->_month;
$year = $this->_year;
if ($month > 2) {
// March = 0, April = 1, ..., December = 9,
// January = 10, February = 11
$month -= 3;
} else {
$month += 9;
--$year;
}
$hb_negativeyear = $year < 0;
$century = intval($year / 100);
$year = $year % 100;
if ($hb_negativeyear) {
// Subtract 1 because year 0 is a leap year;
// And N.B. that we must treat the leap years as occurring
// one year earlier than they do, because for the purposes
// of calculation, the year starts on 1st March:
//
return intval((14609700 * $century + ($year == 0 ? 1 : 0)) / 400) +
intval((1461 * $year + 1) / 4) +
intval((153 * $month + 2) / 5) +
$day + 1721118;
} else {
return intval(146097 * $century / 4) +
intval(1461 * $year / 4) +
intval((153 * $month + 2) / 5) +
$day + 1721119;
}
}
/**
* Converts number of days since 24th November, 4714 B.C. (in the proleptic
* Gregorian calendar, which is year -4713 using 'Astronomical' year
* numbering) to Gregorian calendar date.
*
* Returned date belongs to the proleptic Gregorian calendar, using
* 'Astronomical' year numbering.
*
* The algorithm is valid for all years (positive and negative), and
* also for years preceding 4714 B.C. (i.e. for negative 'Julian Days'),
* and so the only limitation is platform-dependent (for 32-bit systems
* the maximum year would be something like about 1,465,190 A.D.).
*
* N.B. Monday, 24th November, 4714 B.C. is Julian Day '0'.
*
* Algorithm is from PEAR::Date_Calc
*
* @author Monte Ohrt
* @author Pierre-Alain Joye
* @author Daniel Convissor
* @author C.A. Woodcock
*
* @param int $days the number of days since 24th November, 4714 B.C.
* @param string $format the string indicating how to format the output
*
* @return Horde_Date A Horde_Date object representing the date.
*/
public static function fromDays($days)
{
if (function_exists('jdtogregorian')) {
list($month, $day, $year) = explode('/', jdtogregorian($days));
} else {
$days = intval($days);
$days -= 1721119;
$century = floor((4 * $days - 1) / 146097);
$days = floor(4 * $days - 1 - 146097 * $century);
$day = floor($days / 4);
$year = floor((4 * $day + 3) / 1461);
$day = floor(4 * $day + 3 - 1461 * $year);
$day = floor(($day + 4) / 4);
$month = floor((5 * $day - 3) / 153);
$day = floor(5 * $day - 3 - 153 * $month);
$day = floor(($day + 5) / 5);
$year = $century * 100 + $year;
if ($month < 10) {
$month +=3;
} else {
$month -=9;
++$year;
}
}
return new Horde_Date($year, $month, $day);
}
/**
* Getter for the date and time properties.
*
* @param string $name One of 'year', 'month', 'mday', 'hour', 'min',
* 'sec' or 'timezone' (since Horde_Date 2.0.0).
*
* @return integer|string The property value, or null if not set.
*/
public function __get($name)
{
if ($name == 'day') {
$name = 'mday';
}
if ($name[0] == '_') {
return null;
}
return $this->{'_' . $name};
}
/**
* Setter for the date and time properties.
*
* @param string $name One of 'year', 'month', 'mday', 'hour',
* 'min', 'sec' or 'timezone' (since
* Horde_Date 2.0.0).
* @param integer|string $value The property value.
*/
public function __set($name, $value)
{
if ($name == 'timezone') {
$this->_initializeTimezone($value);
return;
}
if ($name == 'day') {
$name = 'mday';
}
if ($name != 'year' && $name != 'month' && $name != 'mday' &&
$name != 'hour' && $name != 'min' && $name != 'sec') {
throw new InvalidArgumentException('Undefined property ' . $name);
}
$down = $value < $this->{'_' . $name};
$this->{'_' . $name} = $value;
$this->_correct(self::$_corrections[$name], $down);
$this->_formatCache = array();
}
/**
* Returns whether a date or time property exists.
*
* @param string $name One of 'year', 'month', 'mday', 'hour', 'min' or
* 'sec'.
*
* @return boolen True if the property exists and is set.
*/
public function __isset($name)
{
if ($name == 'day') {
$name = 'mday';
}
return ($name == 'year' || $name == 'month' || $name == 'mday' ||
$name == 'hour' || $name == 'min' || $name == 'sec') &&
isset($this->{'_' . $name});
}
/**
* Adds a number of seconds or units to this date, returning a new Date
* object.
*/
public function add($factor)
{
$d = clone($this);
if (is_array($factor) || is_object($factor)) {
foreach ($factor as $property => $value) {
$d->$property += $value;
}
} else {
$d->sec += $factor;
}
return $d;
}
/**
* Subtracts a number of seconds or units from this date, returning a new
* Horde_Date object.
*/
public function sub($factor)
{
if (is_array($factor)) {
foreach ($factor as &$value) {
$value *= -1;
}
} else {
$factor *= -1;
}
return $this->add($factor);
}
/**
* Converts this object to a different timezone.
*
* @param string $timezone The new timezone.
*
* @return Horde_Date This object.
*/
public function setTimezone($timezone)
{
$date = $this->toDateTime();
$date->setTimezone(new DateTimeZone($timezone));
$this->_timezone = $timezone;
$this->_year = (int)$date->format('Y');
$this->_month = (int)$date->format('m');
$this->_mday = (int)$date->format('d');
$this->_hour = (int)$date->format('H');
$this->_min = (int)$date->format('i');
$this->_sec = (int)$date->format('s');
$this->_formatCache = array();
return $this;
}
/**
* Sets the default date format used in __toString()
*
* @param string $format
*/
public function setDefaultFormat($format)
{
$this->_defaultFormat = $format;
}
/**
* Returns the day of the week (0 = Sunday, 6 = Saturday) of this date.
*
* @return integer The day of the week.
*/
public function dayOfWeek()
{
if ($this->_month > 2) {
$month = $this->_month - 2;
$year = $this->_year;
} else {
$month = $this->_month + 10;
$year = $this->_year - 1;
}
$day = (floor((13 * $month - 1) / 5) +
$this->_mday + ($year % 100) +
floor(($year % 100) / 4) +
floor(($year / 100) / 4) - 2 *
floor($year / 100) + 77);
return (int)($day - 7 * floor($day / 7));
}
/**
* Returns the day number of the year (1 to 365/366).
*
* @return integer The day of the year.
*/
public function dayOfYear()
{
return $this->format('z') + 1;
}
/**
* Returns the week of the month.
*
* @return integer The week number.
*/
public function weekOfMonth()
{
return ceil($this->_mday / 7);
}
/**
* Returns the week of the year, first Monday is first day of first week.
*
* @return integer The week number.
*/
public function weekOfYear()
{
return $this->format('W');
}
/**
* Returns the number of weeks in the given year (52 or 53).
*
* @param integer $year The year to count the number of weeks in.
*
* @return integer $numWeeks The number of weeks in $year.
*/
public static function weeksInYear($year)
{
// Find the last Thursday of the year.
$date = new Horde_Date($year . '-12-31');
while ($date->dayOfWeek() != self::DATE_THURSDAY) {
--$date->mday;
}
return $date->weekOfYear();
}
/**
* Sets the date of this object to the $nth weekday of $weekday.
*
* @param integer $weekday The day of the week (0 = Sunday, etc).
* @param integer $nth The $nth $weekday to set to (defaults to 1).
*/
public function setNthWeekday($weekday, $nth = 1)
{
if ($weekday < self::DATE_SUNDAY || $weekday > self::DATE_SATURDAY) {
return;
}
$this->_mday = 1;
$first = $this->dayOfWeek();
if ($weekday < $first) {
$this->_mday = 8 + $weekday - $first;
} else {
$this->_mday = $weekday - $first + 1;
}
$diff = 7 * $nth - 7;
$this->_mday += $diff;
$this->_correct(self::MASK_DAY, $diff < 0);
}
/**
* Is the date currently represented by this object a valid date?
*
* @return boolean Validity, counting leap years, etc.
*/
public function isValid()
{
return ($this->_year >= 0 && $this->_year <= 9999);
}
/**
* Compares this date to another date object to see which one is
* greater (later). Assumes that the dates are in the same
* timezone.
*
* @param mixed $other The date to compare to.
*
* @return integer == 0 if they are on the same date
* >= 1 if $this is greater (later)
* <= -1 if $other is greater (later)
*/
public function compareDate($other)
{
if (!($other instanceof Horde_Date)) {
$other = new Horde_Date($other);
}
if ($this->_year != $other->year) {
return $this->_year - $other->year;
}
if ($this->_month != $other->month) {
return $this->_month - $other->month;
}
return $this->_mday - $other->mday;
}
/**
* Returns whether this date is after the other.
*
* @param mixed $other The date to compare to.
*
* @return boolean True if this date is after the other.
*/
public function after($other)
{
return $this->compareDate($other) > 0;
}
/**
* Returns whether this date is before the other.
*
* @param mixed $other The date to compare to.
*
* @return boolean True if this date is before the other.
*/
public function before($other)
{
return $this->compareDate($other) < 0;
}
/**
* Returns whether this date is the same like the other.
*
* @param mixed $other The date to compare to.
*
* @return boolean True if this date is the same like the other.
*/
public function equals($other)
{
return $this->compareDate($other) == 0;
}
/**
* Compares this to another date object by time, to see which one
* is greater (later). Assumes that the dates are in the same
* timezone.
*
* @param mixed $other The date to compare to.
*
* @return integer == 0 if they are at the same time
* >= 1 if $this is greater (later)
* <= -1 if $other is greater (later)
*/
public function compareTime($other)
{
if (!($other instanceof Horde_Date)) {
$other = new Horde_Date($other);
}
if ($this->_hour != $other->hour) {
return $this->_hour - $other->hour;
}
if ($this->_min != $other->min) {
return $this->_min - $other->min;
}
return $this->_sec - $other->sec;
}
/**
* Compares this to another date object, including times, to see
* which one is greater (later). Assumes that the dates are in the
* same timezone.
*
* @param mixed $other The date to compare to.
*
* @return integer == 0 if they are equal
* >= 1 if $this is greater (later)
* <= -1 if $other is greater (later)
*/
public function compareDateTime($other)
{
if (!($other instanceof Horde_Date)) {
$other = new Horde_Date($other);
}
if ($diff = $this->compareDate($other)) {
return $diff;
}
return $this->compareTime($other);
}
/**
* Returns number of days between this date and another.
*
* @param Horde_Date $other The other day to diff with.
*
* @return integer The absolute number of days between the two dates.
*/
public function diff($other)
{
return abs($this->toDays() - $other->toDays());
}
/**
* Returns the time offset for local time zone.
*
* @param boolean $colon Place a colon between hours and minutes?
*
* @return string Timezone offset as a string in the format +HH:MM.
*/
public function tzOffset($colon = true)
{
return $colon ? $this->format('P') : $this->format('O');
}
/**
* Returns the unix timestamp representation of this date.
*
* @return integer A unix timestamp.
*/
public function timestamp()
{
if ($this->_year >= 1970 && $this->_year < 2038) {
return mktime($this->_hour, $this->_min, $this->_sec,
$this->_month, $this->_mday, $this->_year);
}
return $this->format('U');
}
/**
* Returns the unix timestamp representation of this date, 12:00am.
*
* @return integer A unix timestamp.
*/
public function datestamp()
{
if ($this->_year >= 1970 && $this->_year < 2038) {
return mktime(0, 0, 0, $this->_month, $this->_mday, $this->_year);
}
$date = new DateTime($this->format('Y-m-d'));
return $date->format('U');
}
/**
* Formats date and time to be passed around as a short url parameter.
*
* @return string Date and time.
*/
public function dateString()
{
return sprintf('%04d%02d%02d', $this->_year, $this->_month, $this->_mday);
}
/**
* Formats date and time to the ISO format used by JSON.
*
* @return string Date and time.
*/
public function toJson()
{
return $this->format(self::DATE_JSON);
}
/**
* Formats date and time to the RFC 2445 iCalendar DATE-TIME format.
*
* @param boolean $floating Whether to return a floating date-time
* (without time zone information).
*
* @return string Date and time.
*/
public function toiCalendar($floating = false)
{
if ($floating) {
return $this->format('Ymd\THis');
}
$dateTime = $this->toDateTime();
$dateTime->setTimezone(new DateTimeZone('UTC'));
return $dateTime->format('Ymd\THis\Z');
}
/**
* Formats time using the specifiers available in date() or in the DateTime
* class' format() method.
*
* To format in languages other than English, use strftime() instead.
*
* @param string $format
*
* @return string Formatted time.
*/
public function format($format)
{
if (!isset($this->_formatCache[$format])) {
$this->_formatCache[$format] = $this->toDateTime()->format($format);
}
return $this->_formatCache[$format];
}
/**
* Formats date and time using strftime() format.
*
* @return string strftime() formatted date and time.
*/
public function strftime($format)
{
if (preg_match('/%[^' . self::$_supportedSpecs . ']/', $format)) {
return strftime($format, $this->timestamp());
} else {
return $this->_strftime($format);
}
}
/**
* Callback used to replace a strtime pattern
*
* @param array $matches preg_replace_callback() matches.
*
* @return string Replacement string.
*/
protected function _regexCallback($reg)
{
switch ($reg[0]) {
case '%b': return $this->strftime(Horde_Nls::getLangInfo(constant('ABMON_' . (int)$this->_month)));
case '%B': return $this->strftime(Horde_Nls::getLangInfo(constant('MON_' . (int)$this->_month)));
case '%C': return (int)($this->_year / 100);
case '%-d':
case '%#d': return sprintf('%d', $this->_mday);
case '%d': return sprintf('%02d', $this->_mday);
case '%D': return $this->strftime('%m/%d/%y');
case '%e': return sprintf('%2d', $this->_mday);
case '%-H':
case '%#H': return sprintf('%d', $this->_hour);
case '%H': return sprintf('%02d', $this->_hour);
case '%-I':
case '%#I': return sprintf('%d', $this->_hour == 0 ? 12 : ($this->_hour > 12 ? $this->_hour - 12 : $this->_hour));
case '%I': return sprintf('%02d', $this->_hour == 0 ? 12 : ($this->_hour > 12 ? $this->_hour - 12 : $this->_hour));
case '%-m':
case '%#m': return sprintf('%d', $this->_month);
case '%m': return sprintf('%02d', $this->_month);
case '%-M':
case '%#M': return sprintf('%d', $this->_min);
case '%M': return sprintf('%02d', $this->_min);
case '%n': return "\n";
case '%p': return $this->strftime(Horde_Nls::getLangInfo($this->_hour < 12 ? AM_STR : PM_STR));
case '%R': return $this->strftime('%H:%M');
case '%-S':
case '%#S': return sprintf('%d', $this->_sec);
case '%S': return sprintf('%02d', $this->_sec);
case '%t': return "\t";
case '%T': return $this->strftime('%H:%M:%S');
case '%x': return $this->strftime(Horde_Nls::getLangInfo(D_FMT));
case '%X': return $this->strftime(Horde_Nls::getLangInfo(T_FMT));
case '%y': return substr(sprintf('%04d', $this->_year), -2);
case '%Y': return (int)$this->_year;
case '%%': return '%';
}
return $reg[0];
}
/**
* Formats date and time using a limited set of the strftime() format.
*
* @return string strftime() formatted date and time.
*/
protected function _strftime($format)
{
return preg_replace_callback('/(%([-#]?)[%bBCdDeHImMnpRStTxXyY])/', array($this, '_regexCallback'), $format);
}
/**
* Corrects any over- or underflows in any of the date's members.
*
* @param integer $mask We may not want to correct some overflows.
* @param integer $down Whether to correct the date up or down.
*/
protected function _correct($mask = self::MASK_ALLPARTS, $down = false)
{
if ($mask & self::MASK_SECOND) {
if ($this->_sec < 0 || $this->_sec > 59) {
$mask |= self::MASK_MINUTE;
$this->_min += (int)($this->_sec / 60);
$this->_sec %= 60;
if ($this->_sec < 0) {
$this->_min--;
$this->_sec += 60;
}
}
}
if ($mask & self::MASK_MINUTE) {
if ($this->_min < 0 || $this->_min > 59) {
$mask |= self::MASK_HOUR;
$this->_hour += (int)($this->_min / 60);
$this->_min %= 60;
if ($this->_min < 0) {
$this->_hour--;
$this->_min += 60;
}
}
}
if ($mask & self::MASK_HOUR) {
if ($this->_hour < 0 || $this->_hour > 23) {
$mask |= self::MASK_DAY;
$this->_mday += (int)($this->_hour / 24);
$this->_hour %= 24;
if ($this->_hour < 0) {
$this->_mday--;
$this->_hour += 24;
}
}
}
if ($mask & self::MASK_MONTH) {
$this->_correctMonth();
/* When correcting the month, always correct the day too. Months
* have different numbers of days. */
$mask |= self::MASK_DAY;
}
if ($mask & self::MASK_DAY) {
while ($this->_mday > (366 + 31)) {
if ((Horde_Date_Utils::isLeapYear($this->_year) &&
($this->_month <= 2)) ||
(Horde_Date_Utils::isLeapYear($this->_year + 1) &&
($this->_month > 2))) {
$this->_mday -= 366;
} else {
$this->_mday -= 365;
}
$this->_year++;
}
while ($this->_mday > 28 &&
$this->_mday > Horde_Date_Utils::daysInMonth($this->_month, $this->_year)) {
if ($down) {
$this->_mday -= Horde_Date_Utils::daysInMonth($this->_month + 1, $this->_year) - Horde_Date_Utils::daysInMonth($this->_month, $this->_year);
} else {
$this->_mday -= Horde_Date_Utils::daysInMonth($this->_month, $this->_year);
$this->_month++;
}
$this->_correctMonth();
}
while ($this->_mday < 1) {
--$this->_month;
$this->_correctMonth();
$this->_mday += Horde_Date_Utils::daysInMonth($this->_month, $this->_year);
}
}
}
/**
* Corrects the current month.
*
* This cannot be done in _correct() because that would also trigger a
* correction of the day, which would result in an infinite loop.
*/
protected function _correctMonth()
{
$this->_year += (int)($this->_month / 12);
$this->_month %= 12;
if ($this->_month < 1) {
$this->_year--;
$this->_month += 12;
}
}
/**
* Handles args in order: year month day hour min sec tz
*/
protected function _initializeFromArgs($args)
{
$tz = (isset($args[6])) ? array_pop($args) : null;
$this->_initializeTimezone($tz);
$args = array_slice($args, 0, 6);
$keys = array('year' => 1, 'month' => 1, 'mday' => 1, 'hour' => 0, 'min' => 0, 'sec' => 0);
$date = array_combine(array_slice(array_keys($keys), 0, count($args)), $args);
$date = array_merge($keys, $date);
$this->_initializeFromArray($date);
}
protected function _initializeFromArray($date)
{
if (isset($date['year']) && is_string($date['year']) && strlen($date['year']) == 2) {
if ($date['year'] > 70) {
$date['year'] += 1900;
} else {
$date['year'] += 2000;
}
}
foreach ($date as $key => $val) {
if (in_array($key, array('year', 'month', 'mday', 'hour', 'min', 'sec'))) {
$this->{'_'. $key} = (int)$val;
}
}
// If $date['day'] is present and numeric we may have been passed
// a Horde_Form_datetime array.
if (isset($date['day']) &&
(string)(int)$date['day'] == $date['day']) {
$this->_mday = (int)$date['day'];
}
// 'minute' key also from Horde_Form_datetime
if (isset($date['minute']) &&
(string)(int)$date['minute'] == $date['minute']) {
$this->_min = (int)$date['minute'];
}
$this->_correct();
}
protected function _initializeFromObject($date)
{
if ($date instanceof DateTime) {
$this->_year = (int)$date->format('Y');
$this->_month = (int)$date->format('m');
$this->_mday = (int)$date->format('d');
$this->_hour = (int)$date->format('H');
$this->_min = (int)$date->format('i');
$this->_sec = (int)$date->format('s');
$this->_initializeTimezone($date->getTimezone()->getName());
} else {
$is_horde_date = $date instanceof Horde_Date;
foreach (array('year', 'month', 'mday', 'hour', 'min', 'sec') as $key) {
if ($is_horde_date || isset($date->$key)) {
$this->{'_' . $key} = (int)$date->$key;
}
}
if (!$is_horde_date) {
$this->_correct();
} else {
$this->_initializeTimezone($date->timezone);
}
}
}
protected function _initializeTimezone($timezone)
{
if (empty($timezone)) {
$timezone = date_default_timezone_get();
}
$this->_timezone = $timezone;
}
}
Horde_Date-2.0.7/locale/ar/LC_MESSAGES/Horde_Date.po 0000664 0001750 0001750 00000003174 12227212717 017616 0 ustar jan jan # Arabic translations for Horde_Date module.
# Copyright 2010-2013 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_Date module.
# Automatically generated, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_Date\n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2010-10-13 01:27+0200\n"
"PO-Revision-Date: 2010-10-13 01:27+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: i18n@lists.horde.org\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: lib/Horde/Date/Utils.php:106
#, php-format
msgid "%d days ago"
msgstr ""
#: lib/Horde/Date/Utils.php:96
#, php-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Utils.php:91
#, php-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Utils.php:87
#, php-format
msgid "%d second ago"
msgid_plural "%d seconds ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Utils.php:111
#, php-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Recurrence.php:216
msgid "Daily"
msgstr "يومي"
#: lib/Horde/Date/Recurrence.php:219
msgid "Monthly"
msgstr "شهرياً"
#: lib/Horde/Date/Recurrence.php:215
msgid "No recurrence"
msgstr ""
#: lib/Horde/Date/Recurrence.php:217
msgid "Weekly"
msgstr "أسبوعياً"
#: lib/Horde/Date/Recurrence.php:222
msgid "Yearly"
msgstr "سنوياً"
#: lib/Horde/Date/Utils.php:101
#, php-format
msgid "yesterday at %s"
msgstr ""
Horde_Date-2.0.7/locale/bg/LC_MESSAGES/Horde_Date.po 0000664 0001750 0001750 00000003277 12227212717 017610 0 ustar jan jan # Bulgarian translations for Horde_Date module.
# Copyright 2010-2013 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_Date module.
# Automatically generated, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_Date\n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2010-10-13 01:27+0200\n"
"PO-Revision-Date: 2010-10-13 01:27+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: i18n@lists.horde.org\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: lib/Horde/Date/Utils.php:106
#, fuzzy, php-format
msgid "%d days ago"
msgstr " (%s дни назад)"
#: lib/Horde/Date/Utils.php:96
#, php-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Utils.php:91
#, php-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Utils.php:87
#, php-format
msgid "%d second ago"
msgid_plural "%d seconds ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Utils.php:111
#, php-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Recurrence.php:216
msgid "Daily"
msgstr "Ежедневно"
#: lib/Horde/Date/Recurrence.php:219
msgid "Monthly"
msgstr "МеÑечно"
#: lib/Horde/Date/Recurrence.php:215
msgid "No recurrence"
msgstr ""
#: lib/Horde/Date/Recurrence.php:217
msgid "Weekly"
msgstr "Седмично"
#: lib/Horde/Date/Recurrence.php:222
msgid "Yearly"
msgstr "Годишно"
#: lib/Horde/Date/Utils.php:101
#, fuzzy, php-format
msgid "yesterday at %s"
msgstr " (вчера)"
Horde_Date-2.0.7/locale/bs/LC_MESSAGES/Horde_Date.po 0000664 0001750 0001750 00000003255 12227212717 017620 0 ustar jan jan # Bosnian translations for Horde_Date module.
# Copyright 2010-2013 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_Date module.
# Automatically generated, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_Date\n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2010-10-13 01:27+0200\n"
"PO-Revision-Date: 2010-10-13 01:27+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: i18n@lists.horde.org\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: lib/Horde/Date/Utils.php:106
#, fuzzy, php-format
msgid "%d days ago"
msgstr " (prije %s dana)"
#: lib/Horde/Date/Utils.php:96
#, php-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Utils.php:91
#, fuzzy, php-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "%s minuta"
msgstr[1] "%s minuta"
#: lib/Horde/Date/Utils.php:87
#, php-format
msgid "%d second ago"
msgid_plural "%d seconds ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Utils.php:111
#, php-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Recurrence.php:216
msgid "Daily"
msgstr "Dnevno"
#: lib/Horde/Date/Recurrence.php:219
msgid "Monthly"
msgstr "MjeseÄno"
#: lib/Horde/Date/Recurrence.php:215
msgid "No recurrence"
msgstr ""
#: lib/Horde/Date/Recurrence.php:217
msgid "Weekly"
msgstr "SedmiÄno"
#: lib/Horde/Date/Recurrence.php:222
msgid "Yearly"
msgstr "Godišnje"
#: lib/Horde/Date/Utils.php:101
#, fuzzy, php-format
msgid "yesterday at %s"
msgstr " (juÄe)"
Horde_Date-2.0.7/locale/ca/LC_MESSAGES/Horde_Date.po 0000664 0001750 0001750 00000003261 12227212717 017574 0 ustar jan jan # Catalan translations for Horde_Date module.
# Copyright 2010-2013 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_Date module.
# Automatically generated, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_Date\n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2010-10-13 01:27+0200\n"
"PO-Revision-Date: 2010-10-13 01:27+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: i18n@lists.horde.org\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: lib/Horde/Date/Utils.php:106
#, fuzzy, php-format
msgid "%d days ago"
msgstr "(fa %s dies)"
#: lib/Horde/Date/Utils.php:96
#, php-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Utils.php:91
#, fuzzy, php-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "%s minuts"
msgstr[1] "%s minuts"
#: lib/Horde/Date/Utils.php:87
#, php-format
msgid "%d second ago"
msgid_plural "%d seconds ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Utils.php:111
#, php-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Recurrence.php:216
msgid "Daily"
msgstr "Dià riament"
#: lib/Horde/Date/Recurrence.php:219
msgid "Monthly"
msgstr "Mensualment"
#: lib/Horde/Date/Recurrence.php:215
msgid "No recurrence"
msgstr ""
#: lib/Horde/Date/Recurrence.php:217
msgid "Weekly"
msgstr "Setmanalment"
#: lib/Horde/Date/Recurrence.php:222
msgid "Yearly"
msgstr "Anualment"
#: lib/Horde/Date/Utils.php:101
#, fuzzy, php-format
msgid "yesterday at %s"
msgstr "(ahir)"
Horde_Date-2.0.7/locale/cs/LC_MESSAGES/Horde_Date.mo 0000664 0001750 0001750 00000001120 12227212717 017603 0 ustar jan jan Þ• D l ˆ ‰ — ž ‡ ¥ - 4 @ H Daily Monthly Weekly Yearly Project-Id-Version: Horde_Date
Report-Msgid-Bugs-To: dev@lists.horde.org
POT-Creation-Date: 2010-10-13 01:27+0200
PO-Revision-Date: 2010-10-13 01:27+0200
Last-Translator: Automatically generated
Language-Team: i18n@lists.horde.org
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;
DennÄ› MÄ›sÃÄnÄ› TýdnÄ› RoÄnÄ› Horde_Date-2.0.7/locale/cs/LC_MESSAGES/Horde_Date.po 0000664 0001750 0001750 00000003366 12227212717 017624 0 ustar jan jan # Czech translations for Horde_Date module.
# Copyright 2010-2013 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_Date module.
# Automatically generated, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_Date\n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2010-10-13 01:27+0200\n"
"PO-Revision-Date: 2010-10-13 01:27+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: i18n@lists.horde.org\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
#: lib/Horde/Date/Utils.php:106
#, fuzzy, php-format
msgid "%d days ago"
msgstr " (před %s dny)"
#: lib/Horde/Date/Utils.php:96
#, php-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: lib/Horde/Date/Utils.php:91
#, fuzzy, php-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "%s minut"
msgstr[1] "%s minut"
msgstr[2] "%s minut"
#: lib/Horde/Date/Utils.php:87
#, php-format
msgid "%d second ago"
msgid_plural "%d seconds ago"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: lib/Horde/Date/Utils.php:111
#, php-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: lib/Horde/Date/Recurrence.php:216
msgid "Daily"
msgstr "DennÄ›"
#: lib/Horde/Date/Recurrence.php:219
msgid "Monthly"
msgstr "MÄ›sÃÄnÄ›"
#: lib/Horde/Date/Recurrence.php:215
msgid "No recurrence"
msgstr ""
#: lib/Horde/Date/Recurrence.php:217
msgid "Weekly"
msgstr "Týdně"
#: lib/Horde/Date/Recurrence.php:222
msgid "Yearly"
msgstr "RoÄnÄ›"
#: lib/Horde/Date/Utils.php:101
#, fuzzy, php-format
msgid "yesterday at %s"
msgstr " (vÄera)"
Horde_Date-2.0.7/locale/da/LC_MESSAGES/Horde_Date.mo 0000664 0001750 0001750 00000001063 12227212717 017570 0 ustar jan jan Þ• D l ˆ ‰ — ž l ¥ # , Daily Monthly Weekly Yearly Project-Id-Version: Horde_Date
Report-Msgid-Bugs-To: dev@lists.horde.org
POT-Creation-Date: 2010-10-13 01:27+0200
PO-Revision-Date: 2010-10-13 01:27+0200
Last-Translator: Automatically generated
Language-Team: i18n@lists.horde.org
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=2; plural=(n != 1);
Daglig MÃ¥nedlig Ugentlig Ã…rlig Horde_Date-2.0.7/locale/da/LC_MESSAGES/Horde_Date.po 0000664 0001750 0001750 00000003245 12227212717 017577 0 ustar jan jan # Danish translations for Horde_Date module.
# Copyright 2010-2013 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_Date module.
# Automatically generated, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_Date\n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2010-10-13 01:27+0200\n"
"PO-Revision-Date: 2010-10-13 01:27+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: i18n@lists.horde.org\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: lib/Horde/Date/Utils.php:106
#, fuzzy, php-format
msgid "%d days ago"
msgstr " (%s dage siden)"
#: lib/Horde/Date/Utils.php:96
#, php-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Utils.php:91
#, fuzzy, php-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "%s minutter"
msgstr[1] "%s minutter"
#: lib/Horde/Date/Utils.php:87
#, php-format
msgid "%d second ago"
msgid_plural "%d seconds ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Utils.php:111
#, php-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Recurrence.php:216
msgid "Daily"
msgstr "Daglig"
#: lib/Horde/Date/Recurrence.php:219
msgid "Monthly"
msgstr "MÃ¥nedlig"
#: lib/Horde/Date/Recurrence.php:215
msgid "No recurrence"
msgstr ""
#: lib/Horde/Date/Recurrence.php:217
msgid "Weekly"
msgstr "Ugentlig"
#: lib/Horde/Date/Recurrence.php:222
msgid "Yearly"
msgstr "Ã…rlig"
#: lib/Horde/Date/Utils.php:101
#, fuzzy, php-format
msgid "yesterday at %s"
msgstr " (i går)"
Horde_Date-2.0.7/locale/de/LC_MESSAGES/Horde_Date.mo 0000664 0001750 0001750 00000002146 12227212717 017577 0 ustar jan jan Þ•
„ ì 0 1 = V s © ¯ Ð
Ø æ í ô w | ‰ ¦ Ã â ý $ . A N
X
%d days ago %d hour ago %d hours ago %d minute ago %d minutes ago %d second ago %d seconds ago %d week ago %d weeks ago Daily Failed to parse time string (%s) Monthly No recurrence Weekly Yearly yesterday at %s Project-Id-Version: Horde_Date
Report-Msgid-Bugs-To: dev@lists.horde.org
POT-Creation-Date: 2013-10-14 14:26+0200
PO-Revision-Date: 2011-03-15 13:42+0100
Last-Translator: Automatically generated
Language-Team: i18n@lists.horde.org
Language:
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=2; plural=(n != 1);
vor %d Tagen vor %d Stunde vor %d Stunden vor %d Minute vor %d Minuten vor %d Sekunde vor %d Sekunden vor %d Woche vor %d Wochen Täglich Zeitformat (%s) nicht erkannt Monatlich Keine Wiederholung Wöchentlich Jährlich gestern um %s Horde_Date-2.0.7/locale/de/LC_MESSAGES/Horde_Date.po 0000664 0001750 0001750 00000003611 12227212717 017600 0 ustar jan jan # German translations for Horde_Date module.
# Copyright 2010-2013 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_Date module.
# Automatically generated, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_Date\n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2013-10-14 14:26+0200\n"
"PO-Revision-Date: 2011-03-15 13:42+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: i18n@lists.horde.org\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: lib/Horde/Date/Utils.php:105
#, php-format
msgid "%d days ago"
msgstr "vor %d Tagen"
#: lib/Horde/Date/Utils.php:95
#, php-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] "vor %d Stunde"
msgstr[1] "vor %d Stunden"
#: lib/Horde/Date/Utils.php:90
#, php-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "vor %d Minute"
msgstr[1] "vor %d Minuten"
#: lib/Horde/Date/Utils.php:85
#, php-format
msgid "%d second ago"
msgid_plural "%d seconds ago"
msgstr[0] "vor %d Sekunde"
msgstr[1] "vor %d Sekunden"
#: lib/Horde/Date/Utils.php:110
#, php-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
msgstr[0] "vor %d Woche"
msgstr[1] "vor %d Wochen"
#: lib/Horde/Date/Recurrence.php:214
msgid "Daily"
msgstr "Täglich"
#: lib/Horde/Date.php:251
#, php-format
msgid "Failed to parse time string (%s)"
msgstr "Zeitformat (%s) nicht erkannt"
#: lib/Horde/Date/Recurrence.php:219
msgid "Monthly"
msgstr "Monatlich"
#: lib/Horde/Date/Recurrence.php:212
msgid "No recurrence"
msgstr "Keine Wiederholung"
#: lib/Horde/Date/Recurrence.php:216
msgid "Weekly"
msgstr "Wöchentlich"
#: lib/Horde/Date/Recurrence.php:223
msgid "Yearly"
msgstr "Jährlich"
#: lib/Horde/Date/Utils.php:100
#, php-format
msgid "yesterday at %s"
msgstr "gestern um %s"
Horde_Date-2.0.7/locale/el/LC_MESSAGES/Horde_Date.mo 0000664 0001750 0001750 00000001126 12227212717 017604 0 ustar jan jan Þ• D l ˆ ‰ — ž l ¥ # 2 I Daily Monthly Weekly Yearly Project-Id-Version: Horde_Date
Report-Msgid-Bugs-To: dev@lists.horde.org
POT-Creation-Date: 2010-10-13 01:27+0200
PO-Revision-Date: 2010-10-13 01:27+0200
Last-Translator: Automatically generated
Language-Team: i18n@lists.horde.org
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=2; plural=(n != 1);
ΗμεÏήσια Μηνιαία Εβδομαδιαία Ετήσια Horde_Date-2.0.7/locale/el/LC_MESSAGES/Horde_Date.po 0000664 0001750 0001750 00000003337 12227212717 017615 0 ustar jan jan # Greek translations for Horde_Date module.
# Copyright 2010-2013 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_Date module.
# Automatically generated, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_Date\n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2010-10-13 01:27+0200\n"
"PO-Revision-Date: 2010-10-13 01:27+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: i18n@lists.horde.org\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: lib/Horde/Date/Utils.php:106
#, fuzzy, php-format
msgid "%d days ago"
msgstr " (Ï€Ïιν από %s ημÎÏες)"
#: lib/Horde/Date/Utils.php:96
#, php-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Utils.php:91
#, fuzzy, php-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "%s λεπτά"
msgstr[1] "%s λεπτά"
#: lib/Horde/Date/Utils.php:87
#, php-format
msgid "%d second ago"
msgid_plural "%d seconds ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Utils.php:111
#, php-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Recurrence.php:216
msgid "Daily"
msgstr "ΗμεÏήσια"
#: lib/Horde/Date/Recurrence.php:219
msgid "Monthly"
msgstr "Μηνιαία"
#: lib/Horde/Date/Recurrence.php:215
msgid "No recurrence"
msgstr ""
#: lib/Horde/Date/Recurrence.php:217
msgid "Weekly"
msgstr "Εβδομαδιαία"
#: lib/Horde/Date/Recurrence.php:222
msgid "Yearly"
msgstr "Ετήσια"
#: lib/Horde/Date/Utils.php:101
#, fuzzy, php-format
msgid "yesterday at %s"
msgstr " (χθες)"
Horde_Date-2.0.7/locale/en/LC_MESSAGES/Horde_Date.mo 0000664 0001750 0001750 00000001762 12227212717 017614 0 ustar jan jan Þ• | Ü ! - F c € ™ Ÿ
§ µ ¼ Ã l Ó @ L e ‚ Ÿ ¸ ¾
Æ Ô Û â
%d days ago %d hour ago %d hours ago %d minute ago %d minutes ago %d second ago %d seconds ago %d week ago %d weeks ago Daily Monthly No recurrence Weekly Yearly yesterday at %s Project-Id-Version: Horde_Date
Report-Msgid-Bugs-To: dev@lists.horde.org
POT-Creation-Date: 2010-10-13 01:27+0200
PO-Revision-Date: 2010-10-13 01:27+0200
Last-Translator: Automatically generated
Language-Team: i18n@lists.horde.org
MIME-Version: 1.0
Content-Type: text/plain; charset=ASCII
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=2; plural=(n != 1);
%d days ago %d hour ago %d hours ago %d minute ago %d minutes ago %d second ago %d seconds ago %d week ago %d weeks ago Daily Monthly No recurrence Weekly Yearly yesterday at %s Horde_Date-2.0.7/locale/en/LC_MESSAGES/Horde_Date.po 0000664 0001750 0001750 00000003350 12227212717 017612 0 ustar jan jan # English translations for Horde_Date module.
# Copyright 2010-2013 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_Date module.
# Automatically generated, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_Date\n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2010-10-13 01:27+0200\n"
"PO-Revision-Date: 2010-10-13 01:27+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: i18n@lists.horde.org\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ASCII\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: lib/Horde/Date/Utils.php:106
#, php-format
msgid "%d days ago"
msgstr "%d days ago"
#: lib/Horde/Date/Utils.php:96
#, php-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] "%d hour ago"
msgstr[1] "%d hours ago"
#: lib/Horde/Date/Utils.php:91
#, php-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "%d minute ago"
msgstr[1] "%d minutes ago"
#: lib/Horde/Date/Utils.php:87
#, php-format
msgid "%d second ago"
msgid_plural "%d seconds ago"
msgstr[0] "%d second ago"
msgstr[1] "%d seconds ago"
#: lib/Horde/Date/Utils.php:111
#, php-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
msgstr[0] "%d week ago"
msgstr[1] "%d weeks ago"
#: lib/Horde/Date/Recurrence.php:216
msgid "Daily"
msgstr "Daily"
#: lib/Horde/Date/Recurrence.php:219
msgid "Monthly"
msgstr "Monthly"
#: lib/Horde/Date/Recurrence.php:215
msgid "No recurrence"
msgstr "No recurrence"
#: lib/Horde/Date/Recurrence.php:217
msgid "Weekly"
msgstr "Weekly"
#: lib/Horde/Date/Recurrence.php:222
msgid "Yearly"
msgstr "Yearly"
#: lib/Horde/Date/Utils.php:101
#, php-format
msgid "yesterday at %s"
msgstr "yesterday at %s"
Horde_Date-2.0.7/locale/es/LC_MESSAGES/Horde_Date.mo 0000664 0001750 0001750 00000002260 12227212717 017613 0 ustar jan jan Þ•
„ ì 0 1 = V s © ¯ Ð
Ø æ í ô ¨
» Ö õ 5 + A m z Š
—
¢
%d days ago %d hour ago %d hours ago %d minute ago %d minutes ago %d second ago %d seconds ago %d week ago %d weeks ago Daily Failed to parse time string (%s) Monthly No recurrence Weekly Yearly yesterday at %s Project-Id-Version: Horde_Date
Report-Msgid-Bugs-To: dev@lists.horde.org
POT-Creation-Date: 2013-03-05 10:52+0100
PO-Revision-Date: 2013-06-11 20:26+0200
Last-Translator: Manuel P. Ayala , Juan C. Blanco
Language-Team: i18n@lists.horde.org
Language: es
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=2; plural=(n != 1);
Hace %d dÃas Hace %d hora Hace %d horas Hace %d minuto Hace %d minutos Hace %d segundo Hace %d segundos Hace %d semana Hace %d semanas Diariamente Análisis de cadena de tiempo (%s) erróneo Mensualmente Sin repetición Semanalmente Anualmente ayer a las %s Horde_Date-2.0.7/locale/es/LC_MESSAGES/Horde_Date.po 0000664 0001750 0001750 00000003730 12227212717 017621 0 ustar jan jan # Spanish translations for Horde_Date package.
# Copyright (C) 2013 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_Date package.
# Automatically generated, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_Date \n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2013-03-05 10:52+0100\n"
"PO-Revision-Date: 2013-06-11 20:26+0200\n"
"Last-Translator: Manuel P. Ayala , Juan C. Blanco "
"\n"
"Language-Team: i18n@lists.horde.org\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: lib/Horde/Date/Utils.php:109
#, php-format
msgid "%d days ago"
msgstr "Hace %d dÃas"
#: lib/Horde/Date/Utils.php:99
#, php-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] "Hace %d hora"
msgstr[1] "Hace %d horas"
#: lib/Horde/Date/Utils.php:94
#, php-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "Hace %d minuto"
msgstr[1] "Hace %d minutos"
#: lib/Horde/Date/Utils.php:89
#, php-format
msgid "%d second ago"
msgid_plural "%d seconds ago"
msgstr[0] "Hace %d segundo"
msgstr[1] "Hace %d segundos"
#: lib/Horde/Date/Utils.php:114
#, php-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
msgstr[0] "Hace %d semana"
msgstr[1] "Hace %d semanas"
#: lib/Horde/Date/Recurrence.php:214
msgid "Daily"
msgstr "Diariamente"
#: lib/Horde/Date.php:251
#, php-format
msgid "Failed to parse time string (%s)"
msgstr "Análisis de cadena de tiempo (%s) erróneo"
#: lib/Horde/Date/Recurrence.php:219
msgid "Monthly"
msgstr "Mensualmente"
#: lib/Horde/Date/Recurrence.php:212
msgid "No recurrence"
msgstr "Sin repetición"
#: lib/Horde/Date/Recurrence.php:216
msgid "Weekly"
msgstr "Semanalmente"
#: lib/Horde/Date/Recurrence.php:223
msgid "Yearly"
msgstr "Anualmente"
#: lib/Horde/Date/Utils.php:104
#, php-format
msgid "yesterday at %s"
msgstr "ayer a las %s"
Horde_Date-2.0.7/locale/et/LC_MESSAGES/Horde_Date.mo 0000664 0001750 0001750 00000002213 12227212717 017612 0 ustar jan jan Þ•
„ ì 0 1 = V s © ¯ Ð
Ø æ í ô | ’ ! ± " Ó # ö % $ J T
d r ~
%d days ago %d hour ago %d hours ago %d minute ago %d minutes ago %d second ago %d seconds ago %d week ago %d weeks ago Daily Failed to parse time string (%s) Monthly No recurrence Weekly Yearly yesterday at %s Project-Id-Version: Horde_Date
Report-Msgid-Bugs-To: dev@lists.horde.org
POT-Creation-Date: 2011-04-04 10:15+0200
PO-Revision-Date: 2010-11-09 01:27+0200
Last-Translator: Alar Sing
Language-Team: i18n@lists.horde.org
Language:
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=2; plural=(n != 1);
%d päeva tagasi %d tund tagasi %d tundi tagasi %d minut tagasi %d minutit tagasi %d sekund tagasi %d sekundittagasi %d nädal tagasi %d nädalat tagasi Iga päev Arusaamatu süntaks aja stringil (%s) Kord kuus Korduvus puudub Kord nädalas Kord aastas eile kell %s Horde_Date-2.0.7/locale/et/LC_MESSAGES/Horde_Date.po 0000664 0001750 0001750 00000003660 12227212717 017624 0 ustar jan jan # Estonian translations for Horde_Date module.
# Copyright 2010-2013 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_Date module.
# Automatically generated, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_Date\n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2011-04-04 10:15+0200\n"
"PO-Revision-Date: 2010-11-09 01:27+0200\n"
"Last-Translator: Alar Sing \n"
"Language-Team: i18n@lists.horde.org\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: lib/Horde/Date/Utils.php:105
#, php-format
msgid "%d days ago"
msgstr "%d päeva tagasi"
#: lib/Horde/Date/Utils.php:95
#, php-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] "%d tund tagasi"
msgstr[1] "%d tundi tagasi"
#: lib/Horde/Date/Utils.php:90
#, php-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "%d minut tagasi"
msgstr[1] "%d minutit tagasi"
#: lib/Horde/Date/Utils.php:85
#, php-format
msgid "%d second ago"
msgid_plural "%d seconds ago"
msgstr[0] "%d sekund tagasi"
msgstr[1] "%d sekundittagasi"
#: lib/Horde/Date/Utils.php:110
#, php-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
msgstr[0] "%d nädal tagasi"
msgstr[1] "%d nädalat tagasi"
#: lib/Horde/Date/Recurrence.php:212
msgid "Daily"
msgstr "Iga päev"
#: lib/Horde/Date.php:253
#, php-format
msgid "Failed to parse time string (%s)"
msgstr "Arusaamatu süntaks aja stringil (%s)"
#: lib/Horde/Date/Recurrence.php:215
msgid "Monthly"
msgstr "Kord kuus"
#: lib/Horde/Date/Recurrence.php:211
msgid "No recurrence"
msgstr "Korduvus puudub"
#: lib/Horde/Date/Recurrence.php:213
msgid "Weekly"
msgstr "Kord nädalas"
#: lib/Horde/Date/Recurrence.php:218
msgid "Yearly"
msgstr "Kord aastas"
#: lib/Horde/Date/Utils.php:100
#, php-format
msgid "yesterday at %s"
msgstr "eile kell %s"
Horde_Date-2.0.7/locale/eu/LC_MESSAGES/Horde_Date.mo 0000664 0001750 0001750 00000002245 12227212717 017620 0 ustar jan jan Þ•
„ ì 0 1 = V s © ¯ Ð
Ø æ í ô ‚ ‡ % š ) À + ê % < ( D
m x ‰
—
%d days ago %d hour ago %d hours ago %d minute ago %d minutes ago %d second ago %d seconds ago %d week ago %d weeks ago Daily Failed to parse time string (%s) Monthly No recurrence Weekly Yearly yesterday at %s Project-Id-Version: Horde_Date
Report-Msgid-Bugs-To: dev@lists.horde.org
POT-Creation-Date: 2012-07-19 18:35+0200
PO-Revision-Date: 2013-01-16 10:16+0100
Last-Translator: Ibon Igartua
Language-Team: i18n@lists.horde.org
Language:
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Plural-Forms: nplurals=2; plural=(n != 1);
orain dela %d egun orain dena %d ordu orain dena %d ordu orain dela %d minutu orain dela %d minutu orain dela %d segundu orain dela %d segundu orain dela %d aste orain dela %d aste Egunero Huts egin du ordu-katea (%s) parseatzean Hilabetero Errepikapenik ez Astero Urtero atzo %s(e)tan Horde_Date-2.0.7/locale/eu/LC_MESSAGES/Horde_Date.po 0000664 0001750 0001750 00000003710 12227212717 017621 0 ustar jan jan # Basque translations for Horde_Date module.
# Copyright 2010-2013 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_Date module.
# Automatically generated, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_Date\n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2012-07-19 18:35+0200\n"
"PO-Revision-Date: 2013-01-16 10:16+0100\n"
"Last-Translator: Ibon Igartua \n"
"Language-Team: i18n@lists.horde.org\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: lib/Horde/Date/Utils.php:105
#, php-format
msgid "%d days ago"
msgstr "orain dela %d egun"
#: lib/Horde/Date/Utils.php:95
#, php-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] "orain dena %d ordu"
msgstr[1] "orain dena %d ordu"
#: lib/Horde/Date/Utils.php:90
#, php-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "orain dela %d minutu"
msgstr[1] "orain dela %d minutu"
#: lib/Horde/Date/Utils.php:85
#, php-format
msgid "%d second ago"
msgid_plural "%d seconds ago"
msgstr[0] "orain dela %d segundu"
msgstr[1] "orain dela %d segundu"
#: lib/Horde/Date/Utils.php:110
#, php-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
msgstr[0] "orain dela %d aste"
msgstr[1] "orain dela %d aste"
#: lib/Horde/Date/Recurrence.php:212
msgid "Daily"
msgstr "Egunero"
#: lib/Horde/Date.php:251
#, php-format
msgid "Failed to parse time string (%s)"
msgstr "Huts egin du ordu-katea (%s) parseatzean"
#: lib/Horde/Date/Recurrence.php:215
msgid "Monthly"
msgstr "Hilabetero"
#: lib/Horde/Date/Recurrence.php:211
msgid "No recurrence"
msgstr "Errepikapenik ez"
#: lib/Horde/Date/Recurrence.php:213
msgid "Weekly"
msgstr "Astero"
#: lib/Horde/Date/Recurrence.php:218
msgid "Yearly"
msgstr "Urtero"
#: lib/Horde/Date/Utils.php:100
#, php-format
msgid "yesterday at %s"
msgstr "atzo %s(e)tan"
Horde_Date-2.0.7/locale/fa/LC_MESSAGES/Horde_Date.po 0000664 0001750 0001750 00000003374 12227212717 017604 0 ustar jan jan # Persian translations for Horde_Date module.
# Copyright 2010-2013 Horde LLC (http://www.horde.org/)
# This file is distributed under the same license as the Horde_Date module.
# Automatically generated, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Horde_Date\n"
"Report-Msgid-Bugs-To: dev@lists.horde.org\n"
"POT-Creation-Date: 2010-10-13 01:27+0200\n"
"PO-Revision-Date: 2010-10-13 01:27+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: i18n@lists.horde.org\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: lib/Horde/Date/Utils.php:106
#, fuzzy, php-format
msgid "%d days ago"
msgstr " (روز قبل %s)"
#: lib/Horde/Date/Utils.php:96
#, php-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] ""
msgstr[1] ""
# #-#-#-#-# compendium.po (Horde 3) #-#-#-#-#
#
#: lib/Horde/Date/Utils.php:91
#, fuzzy, php-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "%s دقیقه"
msgstr[1] "%s دقیقه"
#: lib/Horde/Date/Utils.php:87
#, php-format
msgid "%d second ago"
msgid_plural "%d seconds ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Utils.php:111
#, php-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
msgstr[0] ""
msgstr[1] ""
#: lib/Horde/Date/Recurrence.php:216
msgid "Daily"
msgstr "روزانه"
#: lib/Horde/Date/Recurrence.php:219
msgid "Monthly"
msgstr "ماهانه"
#: lib/Horde/Date/Recurrence.php:215
msgid "No recurrence"
msgstr ""
#: lib/Horde/Date/Recurrence.php:217
msgid "Weekly"
msgstr "Ù‡ÙØªÚ¯ÛŒ"
#: lib/Horde/Date/Recurrence.php:222
msgid "Yearly"
msgstr "سالانه"
#: lib/Horde/Date/Utils.php:101
#, fuzzy, php-format
msgid "yesterday at %s"
msgstr " (دیروز)"
Horde_Date-2.0.7/locale/fi/LC_MESSAGES/Horde_Date.mo 0000664 0001750 0001750 00000002265 12227212717 017607 0 ustar jan jan Þ•
„ ì 0 1 = V s © ¯ Ð
Ø æ í ô ‰ Ž ¢ &