package.xml0000664000175000017500000011741412227212720011304 0ustar janjan 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/COPYING0000664000175000017500000005765612227212717015366 0ustar janjan 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/UPGRADING0000664000175000017500000000066112227212717015556 0ustar janjan====================== 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.php0000664000175000017500000000467112227212717017316 0ustar janjancurrentDayStart) { $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.php0000664000175000017500000000442312227212717020112 0ustar janjantype = $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.php0000664000175000017500000001215512227212717020665 0ustar janjantype = $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.php0000664000175000017500000000055212227212717020531 0ustar janjancurrentFortnightStart) { 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.php0000664000175000017500000000473612227212717017520 0ustar janjancurrentHourStart) { $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.php0000664000175000017500000000467312227212717020044 0ustar janjancurrentMinuteStart) { $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.php0000664000175000017500000000456512227212717017670 0ustar janjancurrentMonthStart) { $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.php0000664000175000017500000000677612227212717020477 0ustar janjantype = $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.php0000664000175000017500000000165212227212717020025 0ustar janjantype = $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.php0000664000175000017500000000257012227212717020010 0ustar janjansecondStart) { $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.php0000664000175000017500000001214512227212717017472 0ustar janjanambiguous = 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.php0000664000175000017500000000666312227212717017477 0ustar janjancurrentWeekStart) { 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.php0000664000175000017500000000562412227212717020162 0ustar janjancurrentWeekStart) { 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.php0000664000175000017500000000430712227212717017475 0ustar janjancurrentYearStart) { $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.php0000664000175000017500000000064012227212717016760 0ustar janjan * @category Horde * @package Date */ class Horde_Date_Exception extends Horde_Exception_Wrapped { } Horde_Date-2.0.7/lib/Horde/Date/Recurrence.php0000664000175000017500000014711012227212717017123 0ustar janjan * @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.php0000664000175000017500000000263712227212717016601 0ustar janjannow)) { 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.php0000664000175000017500000000411312227212717015722 0ustar janjan * @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.php0000664000175000017500000000320112227212717017314 0ustar janjan * @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.php0000664000175000017500000001244212227212717016125 0ustar janjanformat('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.php0000664000175000017500000010602512227212717015026 0ustar janjan 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.po0000664000175000017500000000317412227212717017616 0ustar janjan# 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.po0000664000175000017500000000327712227212717017610 0ustar janjan# 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.po0000664000175000017500000000325512227212717017620 0ustar janjan# 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.po0000664000175000017500000000326112227212717017574 0ustar janjan# 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.mo0000664000175000017500000000112012227212717017603 0ustar janjanÞ•Dlˆ‰—ž‡¥- 4@HDailyMonthlyWeeklyYearlyProject-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.po0000664000175000017500000000336612227212717017624 0ustar janjan# 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.mo0000664000175000017500000000106312227212717017570 0ustar janjanÞ•Dlˆ‰—žl¥ #,DailyMonthlyWeeklyYearlyProject-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); DagligMÃ¥nedligUgentligÃ…rligHorde_Date-2.0.7/locale/da/LC_MESSAGES/Horde_Date.po0000664000175000017500000000324512227212717017577 0ustar janjan# 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.mo0000664000175000017500000000214612227212717017577 0ustar janjanÞ• „ì0 1=Vs© ¯Ð Øæíô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 agoDailyFailed to parse time string (%s)MonthlyNo recurrenceWeeklyYearlyyesterday at %sProject-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 Tagenvor %d Stundevor %d Stundenvor %d Minutevor %d Minutenvor %d Sekundevor %d Sekundenvor %d Wochevor %d WochenTäglichZeitformat (%s) nicht erkanntMonatlichKeine WiederholungWöchentlichJährlichgestern um %sHorde_Date-2.0.7/locale/de/LC_MESSAGES/Horde_Date.po0000664000175000017500000000361112227212717017600 0ustar janjan# 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.mo0000664000175000017500000000112612227212717017604 0ustar janjanÞ•Dlˆ‰—žl¥#2 IDailyMonthlyWeeklyYearlyProject-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.po0000664000175000017500000000333712227212717017615 0ustar janjan# 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.mo0000664000175000017500000000176212227212717017614 0ustar janjanÞ• |Ü  !-Fc€™Ÿ §µ¼ÃlÓ @Le‚Ÿ¸¾ ÆÔÛâ    %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 agoDailyMonthlyNo recurrenceWeeklyYearlyyesterday at %sProject-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 agoDailyMonthlyNo recurrenceWeeklyYearlyyesterday at %sHorde_Date-2.0.7/locale/en/LC_MESSAGES/Horde_Date.po0000664000175000017500000000335012227212717017612 0ustar janjan# 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.mo0000664000175000017500000000226012227212717017613 0ustar janjanÞ• „ì0 1=Vs© ¯Ð Øæíô¨ ­»Ö õ 5+A mz Š — ¢   %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 agoDailyFailed to parse time string (%s)MonthlyNo recurrenceWeeklyYearlyyesterday at %sProject-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íasHace %d horaHace %d horasHace %d minutoHace %d minutosHace %d segundoHace %d segundosHace %d semanaHace %d semanasDiariamenteAnálisis de cadena de tiempo (%s) erróneoMensualmenteSin repeticiónSemanalmenteAnualmenteayer a las %sHorde_Date-2.0.7/locale/es/LC_MESSAGES/Horde_Date.po0000664000175000017500000000373012227212717017621 0ustar janjan# 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.mo0000664000175000017500000000221312227212717017612 0ustar janjanÞ• „ì0 1=Vs© ¯Ð Øæíô|’!±"Ó#ö %$ JT 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 agoDailyFailed to parse time string (%s)MonthlyNo recurrenceWeeklyYearlyyesterday at %sProject-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 tagasiIga päevArusaamatu süntaks aja stringil (%s)Kord kuusKorduvus puudubKord nädalasKord aastaseile kell %sHorde_Date-2.0.7/locale/et/LC_MESSAGES/Horde_Date.po0000664000175000017500000000366012227212717017624 0ustar janjan# 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.mo0000664000175000017500000000224512227212717017620 0ustar janjanÞ• „ì0 1=Vs© ¯Ð Øæíô‚‡%š)À+ê%<(D mx‰ —   %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 agoDailyFailed to parse time string (%s)MonthlyNo recurrenceWeeklyYearlyyesterday at %sProject-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 egunorain dena %d orduorain dena %d orduorain dela %d minutuorain dela %d minutuorain dela %d segunduorain dela %d segunduorain dela %d asteorain dela %d asteEguneroHuts egin du ordu-katea (%s) parseatzeanHilabeteroErrepikapenik ezAsteroUrteroatzo %s(e)tanHorde_Date-2.0.7/locale/eu/LC_MESSAGES/Horde_Date.po0000664000175000017500000000371012227212717017621 0ustar janjan# 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.po0000664000175000017500000000337412227212717017604 0ustar janjan# 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.mo0000664000175000017500000000226512227212717017607 0ustar janjanÞ• „ì0 1=Vs© ¯Ð Øæíô‰Ž ¢&Ã&ê" 44A v „  ›¦   %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 agoDailyFailed to parse time string (%s)MonthlyNo recurrenceWeeklyYearlyyesterday at %sProject-Id-Version: Horde_Date Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2012-07-19 18:35+0200 PO-Revision-Date: 2012-03-08 07:26:49+0200 Last-Translator: Leena Heino Language-Team: Finnish Language: fi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); %d päivää sitten%d tunti sitten%d tuntia sitten%d minuutti sitten%d minuuttia sitten%d sekuntti sitten%d sekunttia sitten%d viikko sitten%d viikkoa sittenPäivittäinMerkkijonosta ei pystytty lukemaan Päiväystä (%s)KuukausittainEi toistoaViikoittainVuosittaineilen tasan %sHorde_Date-2.0.7/locale/fi/LC_MESSAGES/Horde_Date.po0000664000175000017500000000374112227212717017612 0ustar janjan# Finnish 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. # Leena Heino , 2010-2012. # 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: 2012-03-08 07:26:49+0200\n" "Last-Translator: Leena Heino \n" "Language-Team: Finnish \n" "Language: fi\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äivää sitten" #: lib/Horde/Date/Utils.php:95 #, php-format msgid "%d hour ago" msgid_plural "%d hours ago" msgstr[0] "%d tunti sitten" msgstr[1] "%d tuntia sitten" #: lib/Horde/Date/Utils.php:90 #, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "%d minuutti sitten" msgstr[1] "%d minuuttia sitten" #: lib/Horde/Date/Utils.php:85 #, php-format msgid "%d second ago" msgid_plural "%d seconds ago" msgstr[0] "%d sekuntti sitten" msgstr[1] "%d sekunttia sitten" #: lib/Horde/Date/Utils.php:110 #, php-format msgid "%d week ago" msgid_plural "%d weeks ago" msgstr[0] "%d viikko sitten" msgstr[1] "%d viikkoa sitten" #: lib/Horde/Date/Recurrence.php:212 msgid "Daily" msgstr "Päivittäin" #: lib/Horde/Date.php:251 #, php-format msgid "Failed to parse time string (%s)" msgstr "Merkkijonosta ei pystytty lukemaan Päiväystä (%s)" #: lib/Horde/Date/Recurrence.php:215 msgid "Monthly" msgstr "Kuukausittain" #: lib/Horde/Date/Recurrence.php:211 msgid "No recurrence" msgstr "Ei toistoa" #: lib/Horde/Date/Recurrence.php:213 msgid "Weekly" msgstr "Viikoittain" #: lib/Horde/Date/Recurrence.php:218 msgid "Yearly" msgstr "Vuosittain" #: lib/Horde/Date/Utils.php:100 #, php-format msgid "yesterday at %s" msgstr "eilen tasan %s" Horde_Date-2.0.7/locale/fr/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000232412227212717017614 0ustar janjanÞ• „ì0 1=Vs© ¯Ð ØæíôÀÅ Õ"ö$$> cm ›­ ¼ É   %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 agoDailyFailed to parse time string (%s)MonthlyNo recurrenceWeeklyYearlyyesterday at %sProject-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-14 11:53+0100 Last-Translator: Paul De Vlieger Language-Team: French Language: fr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n > 1); X-Generator: Lokalize 1.4 il y a %d joursil y a %d heureil y a %d heuresil y a %d minuteil y a %d minutesil y a %d secondeil y a %d secondesil y a %d semaineil y a %d semainesQuotidienImpossible de lire la date (%s)MensuellementSans répétitionChaque semaineAnnuellementhier à %sHorde_Date-2.0.7/locale/fr/LC_MESSAGES/Horde_Date.po0000664000175000017500000000410012227212717017611 0ustar janjan# French 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. # Paul De Vlieger , 2013 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-14 11:53+0100\n" "Last-Translator: Paul De Vlieger \n" "Language-Team: French \n" "Language: fr\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" "X-Generator: Lokalize 1.4\n" #: lib/Horde/Date/Utils.php:105 #, php-format msgid "%d days ago" msgstr "il y a %d jours" #: lib/Horde/Date/Utils.php:95 #, php-format msgid "%d hour ago" msgid_plural "%d hours ago" msgstr[0] "il y a %d heure" msgstr[1] "il y a %d heures" #: lib/Horde/Date/Utils.php:90 #, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "il y a %d minute" msgstr[1] "il y a %d minutes" #: lib/Horde/Date/Utils.php:85 #, php-format msgid "%d second ago" msgid_plural "%d seconds ago" msgstr[0] "il y a %d seconde" msgstr[1] "il y a %d secondes" #: lib/Horde/Date/Utils.php:110 #, php-format msgid "%d week ago" msgid_plural "%d weeks ago" msgstr[0] "il y a %d semaine" msgstr[1] "il y a %d semaines" #: lib/Horde/Date/Recurrence.php:212 msgid "Daily" msgstr "Quotidien" #: lib/Horde/Date.php:251 #, php-format msgid "Failed to parse time string (%s)" msgstr "Impossible de lire la date (%s)" #: lib/Horde/Date/Recurrence.php:215 msgid "Monthly" msgstr "Mensuellement" #: lib/Horde/Date/Recurrence.php:211 msgid "No recurrence" msgstr "Sans répétition" #: lib/Horde/Date/Recurrence.php:213 msgid "Weekly" msgstr "Chaque semaine" #: lib/Horde/Date/Recurrence.php:218 msgid "Yearly" msgstr "Annuellement" #: lib/Horde/Date/Utils.php:100 #, php-format msgid "yesterday at %s" msgstr "hier à %s" Horde_Date-2.0.7/locale/gl/LC_MESSAGES/Horde_Date.po0000664000175000017500000000317312227212717017615 0ustar janjan# Galician 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 "Diariamente" #: lib/Horde/Date/Recurrence.php:219 msgid "Monthly" msgstr "Mensualmente" #: lib/Horde/Date/Recurrence.php:215 msgid "No recurrence" msgstr "" #: lib/Horde/Date/Recurrence.php:217 msgid "Weekly" msgstr "Semanalmente" #: lib/Horde/Date/Recurrence.php:222 msgid "Yearly" msgstr "Anualmente" #: lib/Horde/Date/Utils.php:101 #, php-format msgid "yesterday at %s" msgstr "" Horde_Date-2.0.7/locale/he/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000064612227212717017606 0ustar janjanÞ•$,8l9Project-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/he/LC_MESSAGES/Horde_Date.po0000664000175000017500000000310412227212717017601 0ustar janjan# Hebrew 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 #, 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/hr/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000242012227212717017613 0ustar janjanÞ• „ì0 1=Vs© ¯Ð ØæíôÕ Ú(è/2A0t¥,¬ Ùãó ú    %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 agoDailyFailed to parse time string (%s)MonthlyNo recurrenceWeeklyYearlyyesterday at %sProject-Id-Version: Horde_Date Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2011-04-04 10:15+0200 PO-Revision-Date: 2011-11-08 16:49+0200 Last-Translator: Valentin Vidic Language-Team: i18n@lists.horde.org Language: hr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); Prije %d danaprije %d satprije %d sataprije %d satiprije %d minutuprije %d minuteprije %d minutaprije %d sekunduprije %d sekundeprije %d sekundiprije %d tjedanprije %d tjednaprije %d tjedanaDnevnoNeuspjelo parsiranje stringa s vremenom (%s)MjeseÄnoBez ponavljanjaTjednoGodiÅ¡njejuÄer u %sHorde_Date-2.0.7/locale/hr/LC_MESSAGES/Horde_Date.po0000664000175000017500000000417212227212717017624 0ustar janjan# Croatian 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. # Valentin Vidic , 2011. # 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: 2011-11-08 16:49+0200\n" "Last-Translator: Valentin Vidic \n" "Language-Team: i18n@lists.horde.org\n" "Language: hr\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%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: lib/Horde/Date/Utils.php:105 #, php-format msgid "%d days ago" msgstr "Prije %d dana" #: lib/Horde/Date/Utils.php:95 #, php-format msgid "%d hour ago" msgid_plural "%d hours ago" msgstr[0] "prije %d sat" msgstr[1] "prije %d sata" msgstr[2] "prije %d sati" #: lib/Horde/Date/Utils.php:90 #, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "prije %d minutu" msgstr[1] "prije %d minute" msgstr[2] "prije %d minuta" #: lib/Horde/Date/Utils.php:85 #, php-format msgid "%d second ago" msgid_plural "%d seconds ago" msgstr[0] "prije %d sekundu" msgstr[1] "prije %d sekunde" msgstr[2] "prije %d sekundi" #: lib/Horde/Date/Utils.php:110 #, php-format msgid "%d week ago" msgid_plural "%d weeks ago" msgstr[0] "prije %d tjedan" msgstr[1] "prije %d tjedna" msgstr[2] "prije %d tjedana" #: lib/Horde/Date/Recurrence.php:212 msgid "Daily" msgstr "Dnevno" #: lib/Horde/Date.php:253 #, php-format msgid "Failed to parse time string (%s)" msgstr "Neuspjelo parsiranje stringa s vremenom (%s)" #: lib/Horde/Date/Recurrence.php:215 msgid "Monthly" msgstr "MjeseÄno" #: lib/Horde/Date/Recurrence.php:211 msgid "No recurrence" msgstr "Bez ponavljanja" #: lib/Horde/Date/Recurrence.php:213 msgid "Weekly" msgstr "Tjedno" #: lib/Horde/Date/Recurrence.php:218 msgid "Yearly" msgstr "GodiÅ¡nje" #: lib/Horde/Date/Utils.php:100 #, php-format msgid "yesterday at %s" msgstr "juÄer u %s" Horde_Date-2.0.7/locale/hu/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000116412227212717017622 0ustar janjanÞ•L |¨©¯ ·ÅÌlÓ@HPdlDailyMonthlyNo recurrenceWeeklyYearlyProject-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); napontahavontaNincs ismétlÅ‘déshetenteéventeHorde_Date-2.0.7/locale/hu/LC_MESSAGES/Horde_Date.po0000664000175000017500000000326712227212717017633 0ustar janjan# Hungarian 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 nappal ezelÅ‘tt)" #: 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] "%d perc" msgstr[1] "%d perc" #: 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 "naponta" #: lib/Horde/Date/Recurrence.php:219 msgid "Monthly" msgstr "havonta" #: lib/Horde/Date/Recurrence.php:215 msgid "No recurrence" msgstr "Nincs ismétlÅ‘dés" #: lib/Horde/Date/Recurrence.php:217 msgid "Weekly" msgstr "hetente" #: lib/Horde/Date/Recurrence.php:222 msgid "Yearly" msgstr "évente" #: lib/Horde/Date/Utils.php:101 #, fuzzy, php-format msgid "yesterday at %s" msgstr " (tegnap)" Horde_Date-2.0.7/locale/id/LC_MESSAGES/Horde_Date.po0000664000175000017500000000314712227212717017610 0ustar janjan# Indonesian 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=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 #, fuzzy, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "%s menit" msgstr[1] "%s menit" #: 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/is/LC_MESSAGES/Horde_Date.po0000664000175000017500000000322512227212717017624 0ustar janjan# Icelandic 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 #, fuzzy, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "à fimm mínútna fresti" msgstr[1] "à fimm mínútna fresti" #: 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 #, fuzzy msgid "Daily" msgstr "Útlit" #: 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/it/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000117512227212717017624 0ustar janjanÞ•L |¨©¯ ·ÅÌlÓ@ GSfuDailyMonthlyNo recurrenceWeeklyYearlyProject-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); GiornoMensilmenteNessuna ricorrenzaOgni SettimanaannualeHorde_Date-2.0.7/locale/it/LC_MESSAGES/Horde_Date.po0000664000175000017500000000327212227212717017627 0ustar janjan# Italian 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 giorni fa)" #: 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] "%d minuti" msgstr[1] "%d minuti" #: 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 "Giorno" #: lib/Horde/Date/Recurrence.php:219 msgid "Monthly" msgstr "Mensilmente" #: lib/Horde/Date/Recurrence.php:215 msgid "No recurrence" msgstr "Nessuna ricorrenza" #: lib/Horde/Date/Recurrence.php:217 msgid "Weekly" msgstr "Ogni Settimana" #: lib/Horde/Date/Recurrence.php:222 msgid "Yearly" msgstr "annuale" #: lib/Horde/Date/Utils.php:101 #, fuzzy, php-format msgid "yesterday at %s" msgstr " (ieri)" Horde_Date-2.0.7/locale/ja/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000207712227212717017604 0ustar janjanÞ• „ì0 1=Vs© ¯Ð Øæíô • Ÿ ¬ ¶ ÀÊ5Ñ$+ 2   %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 agoDailyFailed to parse time string (%s)MonthlyNo recurrenceWeeklyYearlyyesterday at %sProject-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-12 15:59+0900 Last-Translator: Hiromi Kimura Language-Team: i18n@lists.horde.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=1; plural=0; X-Generator: Poedit 1.5.4 %d æ—¥å‰%d 時間å‰%d 分å‰%d ç§’å‰%d 週剿¯Žæ—¥æ™‚間文字列(%s)ã®è§£æžã«å¤±æ•—ã—ã¾ã—ãŸæ¯Žæœˆç¹°ã‚Šè¿”ãˆã•ãªã„毎週毎年昨日㮠%sHorde_Date-2.0.7/locale/ja/LC_MESSAGES/Horde_Date.po0000664000175000017500000000345512227212717017610 0ustar janjan# Japanese translation for Horde. # Copyright 2004-2013 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde package. # Hiromi Kimura # 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-12 15:59+0900\n" "Last-Translator: Hiromi Kimura \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=1; plural=0;\n" "X-Generator: Poedit 1.5.4\n" #: lib/Horde/Date/Utils.php:109 #, php-format msgid "%d days ago" msgstr "%d æ—¥å‰" #: lib/Horde/Date/Utils.php:99 #, php-format msgid "%d hour ago" msgid_plural "%d hours ago" msgstr[0] "%d 時間å‰" #: lib/Horde/Date/Utils.php:94 #, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "%d 分å‰" #: lib/Horde/Date/Utils.php:89 #, php-format msgid "%d second ago" msgid_plural "%d seconds ago" msgstr[0] "%d ç§’å‰" #: lib/Horde/Date/Utils.php:114 #, php-format msgid "%d week ago" msgid_plural "%d weeks ago" msgstr[0] "%d 週å‰" #: lib/Horde/Date/Recurrence.php:214 msgid "Daily" msgstr "毎日" #: lib/Horde/Date.php:251 #, php-format msgid "Failed to parse time string (%s)" msgstr "時間文字列(%s)ã®è§£æžã«å¤±æ•—ã—ã¾ã—ãŸ" #: lib/Horde/Date/Recurrence.php:219 msgid "Monthly" msgstr "毎月" #: lib/Horde/Date/Recurrence.php:212 msgid "No recurrence" msgstr "繰り返ãˆã•ãªã„" #: lib/Horde/Date/Recurrence.php:216 msgid "Weekly" msgstr "毎週" #: lib/Horde/Date/Recurrence.php:223 msgid "Yearly" msgstr "毎年" #: lib/Horde/Date/Utils.php:104 #, php-format msgid "yesterday at %s" msgstr "昨日㮠%s" Horde_Date-2.0.7/locale/km/LC_MESSAGES/Horde_Date.po0000664000175000017500000000343112227212717017617 0ustar janjan# Khmer 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/ko/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000104712227212717017617 0ustar janjanÞ•Dlˆ‰—že¥  DailyMonthlyWeeklyYearlyProject-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=1; plural=0; ì¼ë³„매월매주매년Horde_Date-2.0.7/locale/ko/LC_MESSAGES/Horde_Date.po0000664000175000017500000000310312227212717017615 0ustar janjan# Korean 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=1; plural=0;\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] "" #: lib/Horde/Date/Utils.php:91 #, fuzzy, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "5ë¶„ 마다" #: lib/Horde/Date/Utils.php:87 #, php-format msgid "%d second ago" msgid_plural "%d seconds ago" msgstr[0] "" #: lib/Horde/Date/Utils.php:111 #, php-format msgid "%d week ago" msgid_plural "%d weeks ago" msgstr[0] "" #: 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/lt/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000244012227212717017623 0ustar janjanÞ• „ì0 1=Vs© ¯Ð Øæíô¹¾8Ï7;@:|·$¿ äñ    %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 agoDailyFailed to parse time string (%s)MonthlyNo recurrenceWeeklyYearlyyesterday at %sProject-Id-Version: Horde_Date Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2011-05-28 01:09+0300 PO-Revision-Date: 2011-06-27 23:00+0300 Last-Translator: Vilius Å umskas Language-Team: Lithuanian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2); prieÅ¡ %d dienasprieÅ¡ %d valandÄ…prieÅ¡ %d valandasprieÅ¡ %d valandųprieÅ¡ %d minutÄ™prieÅ¡ %d minutesprieÅ¡ %d minuÄiųprieÅ¡ %d sekundÄ™prieÅ¡ %d sekundesprieÅ¡ %d sekundžiųprieÅ¡ %d savaitÄ™prieÅ¡ %d savaitesprieÅ¡ %d savaiÄiųKasdienNepavyko apdoroti laiko formato (%s)Kas mÄ—nesįNepasikartojantisKas savaitÄ™Kasmetvakar %sHorde_Date-2.0.7/locale/lt/LC_MESSAGES/Horde_Date.po0000664000175000017500000000417612227212717017636 0ustar janjan# Lithuanian 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. # Vilius Å umskas , 2011. # msgid "" msgstr "" "Project-Id-Version: Horde_Date\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2011-05-28 01:09+0300\n" "PO-Revision-Date: 2011-06-27 23:00+0300\n" "Last-Translator: Vilius Å umskas \n" "Language-Team: Lithuanian \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%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" "%100<10 || n%100>=20) ? 1 : 2);\n" #: lib/Horde/Date/Utils.php:105 #, php-format msgid "%d days ago" msgstr "prieÅ¡ %d dienas" #: lib/Horde/Date/Utils.php:95 #, php-format msgid "%d hour ago" msgid_plural "%d hours ago" msgstr[0] "prieÅ¡ %d valandÄ…" msgstr[1] "prieÅ¡ %d valandas" msgstr[2] "prieÅ¡ %d valandų" #: lib/Horde/Date/Utils.php:90 #, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "prieÅ¡ %d minutÄ™" msgstr[1] "prieÅ¡ %d minutes" msgstr[2] "prieÅ¡ %d minuÄių" #: lib/Horde/Date/Utils.php:85 #, php-format msgid "%d second ago" msgid_plural "%d seconds ago" msgstr[0] "prieÅ¡ %d sekundÄ™" msgstr[1] "prieÅ¡ %d sekundes" msgstr[2] "prieÅ¡ %d sekundžių" #: lib/Horde/Date/Utils.php:110 #, php-format msgid "%d week ago" msgid_plural "%d weeks ago" msgstr[0] "prieÅ¡ %d savaitÄ™" msgstr[1] "prieÅ¡ %d savaites" msgstr[2] "prieÅ¡ %d savaiÄių" #: lib/Horde/Date/Recurrence.php:212 msgid "Daily" msgstr "Kasdien" #: lib/Horde/Date.php:253 #, php-format msgid "Failed to parse time string (%s)" msgstr "Nepavyko apdoroti laiko formato (%s)" #: lib/Horde/Date/Recurrence.php:215 msgid "Monthly" msgstr "Kas mÄ—nesį" #: lib/Horde/Date/Recurrence.php:211 msgid "No recurrence" msgstr "Nepasikartojantis" #: lib/Horde/Date/Recurrence.php:213 msgid "Weekly" msgstr "Kas savaitÄ™" #: lib/Horde/Date/Recurrence.php:218 msgid "Yearly" msgstr "Kasmet" #: lib/Horde/Date/Utils.php:100 #, php-format msgid "yesterday at %s" msgstr "vakar %s" Horde_Date-2.0.7/locale/lv/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000253012227212717017625 0ustar janjanÞ• „ì0 1=Vs© ¯Ð Øæíôò÷47=7u:­è'ñ  $ 2 >H   %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 agoDailyFailed to parse time string (%s)MonthlyNo recurrenceWeeklyYearlyyesterday at %sProject-Id-Version: Horde_Date Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2011-04-04 10:15+0200 PO-Revision-Date: 2011-10-16 15:21+0300 Last-Translator: JÄnis Eisaks Language-Team: i18n@lists.horde.org Language: lv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2); X-Poedit-Language: Latvian X-Poedit-Country: LATVIA X-Poedit-SourceCharset: utf-8 pirms %d dienÄmpirms %d stundaspirms %d stundÄmpirms %d stundÄmpirms %d minÅ«tespirms %d minÅ«tÄ“mpirms %d minÅ«tÄ“mpirms %d sekundespirms %d sekundÄ“mpirms %d sekundÄ“mpirms %d nedēļaspirms %d nedēļÄmpirms %d nedēļÄmikdienasNeizdevÄs izanalizÄ“t laika rindu (%s)ikmÄ“neÅ¡aNeatkÄrtojasiknedēļasikgadÄ“jsvakar plkst. %sHorde_Date-2.0.7/locale/lv/LC_MESSAGES/Horde_Date.po0000664000175000017500000000427512227212717017640 0ustar janjan# Latvian translations for Horde_Date package. # Copyright 2011-2013 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Date package. # Automatically generated, 2011. # 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: 2011-10-16 15:21+0300\n" "Last-Translator: JÄnis Eisaks \n" "Language-Team: i18n@lists.horde.org\n" "Language: lv\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%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : " "2);\n" "X-Poedit-Language: Latvian\n" "X-Poedit-Country: LATVIA\n" "X-Poedit-SourceCharset: utf-8\n" #: lib/Horde/Date/Utils.php:105 #, php-format msgid "%d days ago" msgstr "pirms %d dienÄm" #: lib/Horde/Date/Utils.php:95 #, php-format msgid "%d hour ago" msgid_plural "%d hours ago" msgstr[0] "pirms %d stundas" msgstr[1] "pirms %d stundÄm" msgstr[2] "pirms %d stundÄm" #: lib/Horde/Date/Utils.php:90 #, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "pirms %d minÅ«tes" msgstr[1] "pirms %d minÅ«tÄ“m" msgstr[2] "pirms %d minÅ«tÄ“m" #: lib/Horde/Date/Utils.php:85 #, php-format msgid "%d second ago" msgid_plural "%d seconds ago" msgstr[0] "pirms %d sekundes" msgstr[1] "pirms %d sekundÄ“m" msgstr[2] "pirms %d sekundÄ“m" #: lib/Horde/Date/Utils.php:110 #, php-format msgid "%d week ago" msgid_plural "%d weeks ago" msgstr[0] "pirms %d nedēļas" msgstr[1] "pirms %d nedēļÄm" msgstr[2] "pirms %d nedēļÄm" #: lib/Horde/Date/Recurrence.php:212 msgid "Daily" msgstr "ikdienas" #: lib/Horde/Date.php:253 #, php-format msgid "Failed to parse time string (%s)" msgstr "NeizdevÄs izanalizÄ“t laika rindu (%s)" #: lib/Horde/Date/Recurrence.php:215 msgid "Monthly" msgstr "ikmÄ“neÅ¡a" #: lib/Horde/Date/Recurrence.php:211 msgid "No recurrence" msgstr "NeatkÄrtojas" #: lib/Horde/Date/Recurrence.php:213 msgid "Weekly" msgstr "iknedēļas" #: lib/Horde/Date/Recurrence.php:218 msgid "Yearly" msgstr "ikgadÄ“js" #: lib/Horde/Date/Utils.php:100 #, php-format msgid "yesterday at %s" msgstr "vakar plkst. %s" Horde_Date-2.0.7/locale/mk/LC_MESSAGES/Horde_Date.po0000664000175000017500000000320612227212717017617 0ustar janjan# Macedonian 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/nb/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000106412227212717017604 0ustar janjanÞ•Dlˆ‰—žl¥ $-DailyMonthlyWeeklyYearlyProject-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); DagligMÃ¥nedtligUkentligÃ¥rligHorde_Date-2.0.7/locale/nb/LC_MESSAGES/Horde_Date.po0000664000175000017500000000326012227212717017607 0ustar janjan# Norwegian Bokmal 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 dager 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Ã¥nedtlig" #: lib/Horde/Date/Recurrence.php:215 msgid "No recurrence" msgstr "" #: lib/Horde/Date/Recurrence.php:217 msgid "Weekly" msgstr "Ukentlig" #: 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/nl/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000227212227212717017620 0ustar janjanÞ• „ì0 1=Vs© ¯Ð Øæíô­²Ã$á& - 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 agoDailyFailed to parse time string (%s)MonthlyNo recurrenceWeeklyYearlyyesterday at %sProject-Id-Version: Horde_Date Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2012-07-19 18:35+0200 PO-Revision-Date: 2012-11-03 11:59+0100 Last-Translator: Arjen de Korte Language-Team: Dutch Language: nl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); X-Generator: Lokalize 1.4 %d dagen geleden%d uur geleden%d uur geleden%d minuut geleden%d minuten geleden%d seconde geleden%d seconden geleden%d week geleden%d weken geledenDagelijksKan tijd invoer niet verwerken (%s)MaandelijksGeen herhalingWekelijksJaarlijksGisteren om %sHorde_Date-2.0.7/locale/nl/LC_MESSAGES/Horde_Date.po0000664000175000017500000000376212227212717017630 0ustar janjan# Dutch 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. # # Arjen de Korte , 2012. 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: 2012-11-03 11:59+0100\n" "Last-Translator: Arjen de Korte \n" "Language-Team: Dutch \n" "Language: nl\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" "X-Generator: Lokalize 1.4\n" #: lib/Horde/Date/Utils.php:105 #, php-format msgid "%d days ago" msgstr "%d dagen geleden" #: lib/Horde/Date/Utils.php:95 #, php-format msgid "%d hour ago" msgid_plural "%d hours ago" msgstr[0] "%d uur geleden" msgstr[1] "%d uur geleden" #: lib/Horde/Date/Utils.php:90 #, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "%d minuut geleden" msgstr[1] "%d minuten geleden" #: lib/Horde/Date/Utils.php:85 #, php-format msgid "%d second ago" msgid_plural "%d seconds ago" msgstr[0] "%d seconde geleden" msgstr[1] "%d seconden geleden" #: lib/Horde/Date/Utils.php:110 #, php-format msgid "%d week ago" msgid_plural "%d weeks ago" msgstr[0] "%d week geleden" msgstr[1] "%d weken geleden" #: lib/Horde/Date/Recurrence.php:212 msgid "Daily" msgstr "Dagelijks" #: lib/Horde/Date.php:251 #, php-format msgid "Failed to parse time string (%s)" msgstr "Kan tijd invoer niet verwerken (%s)" #: lib/Horde/Date/Recurrence.php:215 msgid "Monthly" msgstr "Maandelijks" #: lib/Horde/Date/Recurrence.php:211 msgid "No recurrence" msgstr "Geen herhaling" #: lib/Horde/Date/Recurrence.php:213 msgid "Weekly" msgstr "Wekelijks" #: lib/Horde/Date/Recurrence.php:218 msgid "Yearly" msgstr "Jaarlijks" #: lib/Horde/Date/Utils.php:100 #, php-format msgid "yesterday at %s" msgstr "Gisteren om %s" Horde_Date-2.0.7/locale/nn/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000106412227212717017620 0ustar janjanÞ•Dlˆ‰—žl¥  #-DailyMonthlyWeeklyYearlyProject-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); DaglegMÃ¥nadlegKvar vekeÃ…rlegHorde_Date-2.0.7/locale/nn/LC_MESSAGES/Horde_Date.po0000664000175000017500000000315512227212717017626 0ustar janjan# Norwegian Nynorsk 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 #, 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 "Dagleg" #: lib/Horde/Date/Recurrence.php:219 msgid "Monthly" msgstr "MÃ¥nadleg" #: lib/Horde/Date/Recurrence.php:215 msgid "No recurrence" msgstr "" #: lib/Horde/Date/Recurrence.php:217 msgid "Weekly" msgstr "Kvar veke" #: lib/Horde/Date/Recurrence.php:222 msgid "Yearly" msgstr "Ã…rleg" #: lib/Horde/Date/Utils.php:101 #, php-format msgid "yesterday at %s" msgstr "" Horde_Date-2.0.7/locale/pl/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000116612227212717017623 0ustar janjanÞ•Dlˆ‰—ž¦¥ L W coDailyMonthlyWeeklyYearlyProject-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%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); CodziennieCo miesiÄ…cCo tydzieÅ„Co rokHorde_Date-2.0.7/locale/pl/LC_MESSAGES/Horde_Date.po0000664000175000017500000000344012227212717017623 0ustar janjan# Polish 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%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" #: lib/Horde/Date/Utils.php:106 #, fuzzy, php-format msgid "%d days ago" msgstr " (%s dni temu)" #: 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 "Codziennie" #: lib/Horde/Date/Recurrence.php:219 msgid "Monthly" msgstr "Co miesiÄ…c" #: lib/Horde/Date/Recurrence.php:215 msgid "No recurrence" msgstr "" #: lib/Horde/Date/Recurrence.php:217 msgid "Weekly" msgstr "Co tydzieÅ„" #: lib/Horde/Date/Recurrence.php:222 msgid "Yearly" msgstr "Co rok" #: lib/Horde/Date/Utils.php:101 #, fuzzy, php-format msgid "yesterday at %s" msgstr " (wczoraj)" Horde_Date-2.0.7/locale/pt/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000110212227212717017621 0ustar janjanÞ•Dlˆ‰—žl¥   * 7DailyMonthlyWeeklyYearlyProject-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); DiariamenteMensalmenteSemanalmenteAnualmenteHorde_Date-2.0.7/locale/pt/LC_MESSAGES/Horde_Date.po0000664000175000017500000000326612227212717017641 0ustar janjan# Portuguese 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 dias atrá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 minutos" msgstr[1] "%s minutos" #: 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 "Diariamente" #: lib/Horde/Date/Recurrence.php:219 msgid "Monthly" msgstr "Mensalmente" #: lib/Horde/Date/Recurrence.php:215 msgid "No recurrence" msgstr "" #: lib/Horde/Date/Recurrence.php:217 msgid "Weekly" msgstr "Semanalmente" #: lib/Horde/Date/Recurrence.php:222 msgid "Yearly" msgstr "Anualmente" #: lib/Horde/Date/Utils.php:101 #, fuzzy, php-format msgid "yesterday at %s" msgstr " (ontem)" Horde_Date-2.0.7/locale/pt_BR/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000225012227212717020211 0ustar janjanÞ• „ì0 1=Vs© ¯Ð ØæíôŽ“¢"Á$ä"  ,.8 gs ƒ  ›   %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 agoDailyFailed to parse time string (%s)MonthlyNo recurrenceWeeklyYearlyyesterday at %sProject-Id-Version: Horde_Date Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2013-03-05 10:52+0100 PO-Revision-Date: 2011-06-11 20:34-0300 Last-Translator: Luis Felipe Marzagao 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 dias atrás%d hora atrás%d horas atrás%d minuto atrás%d minutos atrás%d segundo atrás%d segundos atrás%d semana atrás%d semanas atrásDiariamenteFalhou ao processar os cracteres de tempo (%s)MensalmenteSem repetiçãoSemanalmenteAnualmenteontem às %sHorde_Date-2.0.7/locale/pt_BR/LC_MESSAGES/Horde_Date.po0000664000175000017500000000371712227212717020225 0ustar janjan# Portuguese 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-03-05 10:52+0100\n" "PO-Revision-Date: 2011-06-11 20:34-0300\n" "Last-Translator: Luis Felipe Marzagao \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:109 #, php-format msgid "%d days ago" msgstr "%d dias atrás" #: lib/Horde/Date/Utils.php:99 #, php-format msgid "%d hour ago" msgid_plural "%d hours ago" msgstr[0] "%d hora atrás" msgstr[1] "%d horas atrás" #: lib/Horde/Date/Utils.php:94 #, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "%d minuto atrás" msgstr[1] "%d minutos atrás" #: lib/Horde/Date/Utils.php:89 #, php-format msgid "%d second ago" msgid_plural "%d seconds ago" msgstr[0] "%d segundo atrás" msgstr[1] "%d segundos atrás" #: lib/Horde/Date/Utils.php:114 #, php-format msgid "%d week ago" msgid_plural "%d weeks ago" msgstr[0] "%d semana atrás" msgstr[1] "%d semanas atrás" #: 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 "Falhou ao processar os cracteres de tempo (%s)" #: lib/Horde/Date/Recurrence.php:219 msgid "Monthly" msgstr "Mensalmente" #: lib/Horde/Date/Recurrence.php:212 msgid "No recurrence" msgstr "Sem repetição" #: 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 "ontem às %s" Horde_Date-2.0.7/locale/ro/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000113612227212717017625 0ustar janjanÞ•Dlˆ‰—žš¥@G MXDailyMonthlyWeeklyYearlyProject-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=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2; ZilnicLunarSaptaminalAnualHorde_Date-2.0.7/locale/ro/LC_MESSAGES/Horde_Date.po0000664000175000017500000000330512227212717017630 0ustar janjan# Romanian 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=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " "20)) ? 1 : 2;\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] "" msgstr[2] "" #: lib/Horde/Date/Utils.php:91 #, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "" msgstr[1] "" msgstr[2] "" #: 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 "Zilnic" #: lib/Horde/Date/Recurrence.php:219 msgid "Monthly" msgstr "Lunar" #: lib/Horde/Date/Recurrence.php:215 msgid "No recurrence" msgstr "" #: lib/Horde/Date/Recurrence.php:217 msgid "Weekly" msgstr "Saptaminal" #: lib/Horde/Date/Recurrence.php:222 msgid "Yearly" msgstr "Anual" #: lib/Horde/Date/Utils.php:101 #, php-format msgid "yesterday at %s" msgstr "" Horde_Date-2.0.7/locale/ru/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000125412227212717017634 0ustar janjanÞ•Dlˆ‰—ž¶¥\o„›DailyMonthlyWeeklyYearlyProject-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%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); ЕжедневноЕжемеÑÑчноЕженедельноЕжегодноHorde_Date-2.0.7/locale/ru/LC_MESSAGES/Horde_Date.po0000664000175000017500000000363012227212717017637 0ustar janjan# Russian 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%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\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] "" msgstr[2] "" #: lib/Horde/Date/Utils.php:91 #, fuzzy, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "%d минут" msgstr[1] "%d минут" msgstr[2] "%d минут" #: 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 "Ежедневно" #: lib/Horde/Date/Recurrence.php:219 msgid "Monthly" msgstr "ЕжемеÑÑчно" #: lib/Horde/Date/Recurrence.php:215 #, fuzzy 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/sk/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000236612227212717017630 0ustar janjanÞ• „ì0 1=Vs© ¯Ð ØæíôŸ¤1³4å4:OŠ/ÀÉ Øã ê   %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 agoDailyFailed to parse time string (%s)MonthlyNo recurrenceWeeklyYearlyyesterday at %sProject-Id-Version: Horde_Date Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2011-04-04 10:15+0200 PO-Revision-Date: 2011-05-18 16:09+0100 Last-Translator: Martin MatuÅ¡ka 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=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2; pred %d dňamipred %d hodinoupred %d hodinamipred %d hodinamipred %d minútoupred %d minútamipred %d minútamipred %d sekundoupred %d sekundamipred %d sekundamipred %d týždňompred %d týždňamipred %d týždňamiDenneNepodarilo sa spracovaÅ¥ Äasový reÅ¥azec (%s)MesaÄneBez opakovaniaTýždenneRoÄnevÄera o %sHorde_Date-2.0.7/locale/sk/LC_MESSAGES/Horde_Date.po0000664000175000017500000000411112227212717017621 0ustar janjan# Slovak 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: 2011-05-18 16:09+0100\n" "Last-Translator: Martin MatuÅ¡ka \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=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #: lib/Horde/Date/Utils.php:105 #, php-format msgid "%d days ago" msgstr "pred %d dňami" #: lib/Horde/Date/Utils.php:95 #, php-format msgid "%d hour ago" msgid_plural "%d hours ago" msgstr[0] "pred %d hodinou" msgstr[1] "pred %d hodinami" msgstr[2] "pred %d hodinami" #: lib/Horde/Date/Utils.php:90 #, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "pred %d minútou" msgstr[1] "pred %d minútami" msgstr[2] "pred %d minútami" #: lib/Horde/Date/Utils.php:85 #, php-format msgid "%d second ago" msgid_plural "%d seconds ago" msgstr[0] "pred %d sekundou" msgstr[1] "pred %d sekundami" msgstr[2] "pred %d sekundami" #: lib/Horde/Date/Utils.php:110 #, php-format msgid "%d week ago" msgid_plural "%d weeks ago" msgstr[0] "pred %d týždňom" msgstr[1] "pred %d týždňami" msgstr[2] "pred %d týždňami" #: lib/Horde/Date/Recurrence.php:212 msgid "Daily" msgstr "Denne" #: lib/Horde/Date.php:253 #, php-format msgid "Failed to parse time string (%s)" msgstr "Nepodarilo sa spracovaÅ¥ Äasový reÅ¥azec (%s)" #: lib/Horde/Date/Recurrence.php:215 msgid "Monthly" msgstr "MesaÄne" #: lib/Horde/Date/Recurrence.php:211 msgid "No recurrence" msgstr "Bez opakovania" #: lib/Horde/Date/Recurrence.php:213 msgid "Weekly" msgstr "Týždenne" #: lib/Horde/Date/Recurrence.php:218 msgid "Yearly" msgstr "RoÄne" #: lib/Horde/Date/Utils.php:100 #, php-format msgid "yesterday at %s" msgstr "vÄera o %s" Horde_Date-2.0.7/locale/sl/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000114512227212717017623 0ustar janjanÞ•Dlˆ‰—ž ¥FMV_DailyMonthlyWeeklyYearlyProject-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=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3); DnevnoMeseÄnoTedenskoLetnoHorde_Date-2.0.7/locale/sl/LC_MESSAGES/Horde_Date.po0000664000175000017500000000352012227212720017617 0ustar janjan# Slovenian 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=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" "%100==4 ? 2 : 3);\n" #: lib/Horde/Date/Utils.php:106 #, fuzzy, php-format msgid "%d days ago" msgstr " (pred %s dnevi)" #: lib/Horde/Date/Utils.php:96 #, php-format msgid "%d hour ago" msgid_plural "%d hours ago" msgstr[0] "" msgstr[1] "" msgstr[2] "" msgstr[3] "" #: 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" msgstr[3] "%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] "" msgstr[3] "" #: lib/Horde/Date/Utils.php:111 #, php-format msgid "%d week ago" msgid_plural "%d weeks ago" msgstr[0] "" msgstr[1] "" msgstr[2] "" msgstr[3] "" #: lib/Horde/Date/Recurrence.php:216 msgid "Daily" msgstr "Dnevno" #: lib/Horde/Date/Recurrence.php:219 msgid "Monthly" msgstr "MeseÄno" #: lib/Horde/Date/Recurrence.php:215 msgid "No recurrence" msgstr "" #: lib/Horde/Date/Recurrence.php:217 msgid "Weekly" msgstr "Tedensko" #: lib/Horde/Date/Recurrence.php:222 msgid "Yearly" msgstr "Letno" #: lib/Horde/Date/Utils.php:101 #, fuzzy, php-format msgid "yesterday at %s" msgstr " (vÄeraj)" Horde_Date-2.0.7/locale/sv/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000106312227212720017626 0ustar janjanÞ•Dlˆ‰—žl¥ #,DailyMonthlyWeeklyYearlyProject-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); DagligMÃ¥natligVeckovisÃ…rligHorde_Date-2.0.7/locale/sv/LC_MESSAGES/Horde_Date.po0000664000175000017500000000324512227212720017635 0ustar janjan# Swedish 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 dagar sedan)" #: 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 minuter" msgstr[1] "%s minuter" #: 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Ã¥natlig" #: lib/Horde/Date/Recurrence.php:215 msgid "No recurrence" msgstr "" #: lib/Horde/Date/Recurrence.php:217 msgid "Weekly" msgstr "Veckovis" #: 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/tr/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000115412227212720017624 0ustar janjanÞ•L |¨©¯ ·ÅÌeÓ9BI YcDailyMonthlyNo recurrenceWeeklyYearlyProject-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=1; plural=0; GünlükAylıkÖzyineleme yokHaftalıkYıllıkHorde_Date-2.0.7/locale/tr/LC_MESSAGES/Horde_Date.po0000664000175000017500000000315512227212720017632 0ustar janjan# Turkish 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=1; plural=0;\n" #: lib/Horde/Date/Utils.php:106 #, fuzzy, php-format msgid "%d days ago" msgstr " (%s gün önce)" #: lib/Horde/Date/Utils.php:96 #, php-format msgid "%d hour ago" msgid_plural "%d hours ago" msgstr[0] "" #: lib/Horde/Date/Utils.php:91 #, fuzzy, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "%d dakika" #: lib/Horde/Date/Utils.php:87 #, php-format msgid "%d second ago" msgid_plural "%d seconds ago" msgstr[0] "" #: lib/Horde/Date/Utils.php:111 #, php-format msgid "%d week ago" msgid_plural "%d weeks ago" msgstr[0] "" #: lib/Horde/Date/Recurrence.php:216 msgid "Daily" msgstr "Günlük" #: lib/Horde/Date/Recurrence.php:219 msgid "Monthly" msgstr "Aylık" #: lib/Horde/Date/Recurrence.php:215 msgid "No recurrence" msgstr "Özyineleme yok" #: lib/Horde/Date/Recurrence.php:217 msgid "Weekly" msgstr "Haftalık" #: lib/Horde/Date/Recurrence.php:222 msgid "Yearly" msgstr "Yıllık" #: lib/Horde/Date/Utils.php:101 #, fuzzy, php-format msgid "yesterday at %s" msgstr " (dün)" Horde_Date-2.0.7/locale/uk/LC_MESSAGES/Horde_Date.mo0000664000175000017500000000122612227212720017616 0ustar janjanÞ•Dlˆ‰—ž¶¥ \gx‡DailyMonthlyWeeklyYearlyProject-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%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); ЩоднÑЩоміÑÑцÑЩотижнÑЩорічноHorde_Date-2.0.7/locale/uk/LC_MESSAGES/Horde_Date.po0000664000175000017500000000354412227212720017626 0ustar janjan# Ukrainian 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%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\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] "" msgstr[2] "" #: lib/Horde/Date/Utils.php:91 #, fuzzy, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "%d хвилин" msgstr[1] "%d хвилин" msgstr[2] "%d хвилин" #: 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 "ЩоднÑ" #: 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/zh_CN/LC_MESSAGES/Horde_Date.po0000664000175000017500000000324112227212720020202 0ustar janjan# Chinese 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 #, 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/zh_TW/LC_MESSAGES/Horde_Date.po0000664000175000017500000000323612227212720020240 0ustar janjan# Chinese 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 #, fuzzy, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "%d 分" msgstr[1] "%d 分" #: 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/Horde_Date.pot0000664000175000017500000000326712227212720015610 0ustar janjan# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Date package. # FIRST AUTHOR , YEAR. # #, fuzzy 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: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #: lib/Horde/Date/Utils.php:105 #, php-format msgid "%d days ago" msgstr "" #: lib/Horde/Date/Utils.php:95 #, php-format msgid "%d hour ago" msgid_plural "%d hours ago" msgstr[0] "" msgstr[1] "" #: lib/Horde/Date/Utils.php:90 #, php-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "" msgstr[1] "" #: lib/Horde/Date/Utils.php:85 #, php-format msgid "%d second ago" msgid_plural "%d seconds ago" msgstr[0] "" msgstr[1] "" #: lib/Horde/Date/Utils.php:110 #, php-format msgid "%d week ago" msgid_plural "%d weeks ago" msgstr[0] "" msgstr[1] "" #: lib/Horde/Date/Recurrence.php:214 msgid "Daily" msgstr "" #: lib/Horde/Date.php:251 #, php-format msgid "Failed to parse time string (%s)" msgstr "" #: lib/Horde/Date/Recurrence.php:219 msgid "Monthly" msgstr "" #: lib/Horde/Date/Recurrence.php:212 msgid "No recurrence" msgstr "" #: lib/Horde/Date/Recurrence.php:216 msgid "Weekly" msgstr "" #: lib/Horde/Date/Recurrence.php:223 msgid "Yearly" msgstr "" #: lib/Horde/Date/Utils.php:100 #, php-format msgid "yesterday at %s" msgstr "" Horde_Date-2.0.7/test/Horde/Date/fixtures/bug2813.ics0000644000175000017500000000135012227212720020155 0ustar janjanBEGIN:VCALENDAR VERSION:2.0 X-WR-CALNAME:Kronolith Bug PRODID:-//Apple Computer\, Inc//iCal 2.0//EN X-WR-RELCALID:6478A81B-4979-4F9D-B9DD-E3F8DD360B96 X-WR-TIMEZONE:US/Eastern CALSCALE:GREGORIAN METHOD:PUBLISH BEGIN:VTIMEZONE TZID:US/Eastern LAST-MODIFIED:20060616T214021Z BEGIN:DAYLIGHT DTSTART:20060402T070000 TZOFFSETTO:-0400 TZOFFSETFROM:+0000 TZNAME:EDT END:DAYLIGHT BEGIN:STANDARD DTSTART:20061029T020000 TZOFFSETTO:-0500 TZOFFSETFROM:-0400 TZNAME:EST END:STANDARD END:VTIMEZONE BEGIN:VEVENT DTSTART;TZID=US/Eastern:20060616T180000 DTEND;TZID=US/Eastern:20060616T190000 SUMMARY:Test 2 UID:3496A948-E0AB-49FF-B76F-45B700B86AF2 SEQUENCE:8 DTSTAMP:20060616T212821Z RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20060618T035959Z END:VEVENT END:VCALENDAR Horde_Date-2.0.7/test/Horde/Date/Repeater/DayNameTest.php0000664000175000017500000000254312227212720021156 0ustar janjannow = new Horde_Date('2006-08-16 14:00:00'); } public function testNextFuture() { $mondays = new Horde_Date_Repeater_DayName('monday'); $mondays->now = $this->now; $span = $mondays->next('future'); $this->assertEquals('2006-08-21', $span->begin->format('Y-m-d')); $this->assertEquals('2006-08-22', $span->end->format('Y-m-d')); $span = $mondays->next('future'); $this->assertEquals('2006-08-28', $span->begin->format('Y-m-d')); $this->assertEquals('2006-08-29', $span->end->format('Y-m-d')); } public function testNextPast() { $mondays = new Horde_Date_Repeater_DayName('monday'); $mondays->now = $this->now; $span = $mondays->next('past'); $this->assertEquals('2006-08-14', $span->begin->format('Y-m-d')); $this->assertEquals('2006-08-15', $span->end->format('Y-m-d')); $span = $mondays->next('past'); $this->assertEquals('2006-08-07', $span->begin->format('Y-m-d')); $this->assertEquals('2006-08-08', $span->end->format('Y-m-d')); } } Horde_Date-2.0.7/test/Horde/Date/Repeater/DayTest.php0000664000175000017500000000136412227212720020355 0ustar janjannow = new Horde_Date('2009-01-01'); $this->assertEquals('(2009-01-02 00:00:00..2009-01-03 00:00:00)', (string)$repeater->next('future')); } public function testNextPast() { $repeater = new Horde_Date_Repeater_Day(); $repeater->now = new Horde_Date('2009-01-01'); $this->assertEquals('(2008-12-31 00:00:00..2009-01-01 00:00:00)', (string)$repeater->next('past')); } } Horde_Date-2.0.7/test/Horde/Date/Repeater/HourTest.php0000664000175000017500000000477512227212720020566 0ustar janjannow = new Horde_Date('2006-08-16 14:00:00'); } public function testNextFuture() { $hours = new Horde_Date_Repeater_Hour(); $hours->now = $this->now; $nextHour = $hours->next('future'); $this->assertEquals('2006-08-16 15:00:00', (string)$nextHour->begin); $this->assertEquals('2006-08-16 16:00:00', (string)$nextHour->end); $nextNextHour = $hours->next('future'); $this->assertEquals('2006-08-16 16:00:00', (string)$nextNextHour->begin); $this->assertEquals('2006-08-16 17:00:00', (string)$nextNextHour->end); } public function testNextPast() { $hours = new Horde_Date_Repeater_Hour(); $hours->now = $this->now; $pastHour = $hours->next('past'); $this->assertEquals('2006-08-16 13:00:00', (string)$pastHour->begin); $this->assertEquals('2006-08-16 14:00:00', (string)$pastHour->end); $pastPastHour = $hours->next('past'); $this->assertEquals('2006-08-16 12:00:00', (string)$pastPastHour->begin); $this->assertEquals('2006-08-16 13:00:00', (string)$pastPastHour->end); } public function testThis() { $hours = new Horde_Date_Repeater_Hour(); $hours->now = new Horde_Date('2006-08-16 14:30:00'); $thisHour = $hours->this('future'); $this->assertEquals('2006-08-16 14:31:00', (string)$thisHour->begin); $this->assertEquals('2006-08-16 15:00:00', (string)$thisHour->end); $thisHour = $hours->this('past'); $this->assertEquals('2006-08-16 14:00:00', (string)$thisHour->begin); $this->assertEquals('2006-08-16 14:30:00', (string)$thisHour->end); } public function testOffset() { $span = new Horde_Date_Span($this->now, $this->now->add(1)); $hours = new Horde_Date_Repeater_Hour(); $offsetSpan = $hours->offset($span, 3, 'future'); $this->assertEquals('2006-08-16 17:00:00', (string)$offsetSpan->begin); $this->assertEquals('2006-08-16 17:00:01', (string)$offsetSpan->end); $offsetSpan = $hours->offset($span, 24, 'past'); $this->assertEquals('2006-08-15 14:00:00', (string)$offsetSpan->begin); $this->assertEquals('2006-08-15 14:00:01', (string)$offsetSpan->end); } } Horde_Date-2.0.7/test/Horde/Date/Repeater/MonthNameTest.php0000664000175000017500000000417512227212720021531 0ustar janjannow = new Horde_Date('2006-08-16 14:00:00'); } public function testNextFuture() { $mays = new Horde_Date_Repeater_MonthName('may'); $mays->now = $this->now; $nextMay = $mays->next('future'); $this->assertEquals('2007-05-01 00:00:00', (string)$nextMay->begin); $this->assertEquals('2007-06-01 00:00:00', (string)$nextMay->end); $nextNextMay = $mays->next('future'); $this->assertEquals('2008-05-01 00:00:00', (string)$nextNextMay->begin); $this->assertEquals('2008-06-01 00:00:00', (string)$nextNextMay->end); $decembers = new Horde_Date_Repeater_MonthName('december'); $decembers->now = $this->now; $nextDecember = $decembers->next('future'); $this->assertEquals('2006-12-01 00:00:00', (string)$nextDecember->begin); $this->assertEquals('2007-01-01 00:00:00', (string)$nextDecember->end); } public function testNextPast() { $mays = new Horde_Date_Repeater_MonthName('may'); $mays->now = $this->now; $this->assertEquals('2006-05-01 00:00:00', (string)$mays->next('past')->begin); $this->assertEquals('2005-05-01 00:00:00', (string)$mays->next('past')->begin); } public function testThis() { $octobers = new Horde_Date_Repeater_MonthName('october'); $octobers->now = $this->now; $thisOctober = $octobers->this('future'); $this->assertEquals('2006-10-01 00:00:00', (string)$thisOctober->begin); $this->assertEquals('2006-11-01 00:00:00', (string)$thisOctober->end); $aprils = new Horde_Date_Repeater_MonthName('april'); $aprils->now = $this->now; $thisApril = $aprils->this('past'); $this->assertEquals('2006-04-01 00:00:00', (string)$thisApril->begin); $this->assertEquals('2006-05-01 00:00:00', (string)$thisApril->end); } } Horde_Date-2.0.7/test/Horde/Date/Repeater/MonthTest.php0000664000175000017500000000213512227212720020722 0ustar janjannow = new Horde_Date('2006-08-16 14:00:00'); } public function testOffsetFuture() { $span = new Horde_Date_Span($this->now, $this->now->add(60)); $repeater = new Horde_Date_Repeater_Month(); $offsetSpan = $repeater->offset($span, 1, 'future'); $this->assertEquals('2006-09-16 14:00:00', (string)$offsetSpan->begin); $this->assertEquals('2006-09-16 14:01:00', (string)$offsetSpan->end); } public function testOffsetPast() { $span = new Horde_Date_Span($this->now, $this->now->add(60)); $repeater = new Horde_Date_Repeater_Month(); $offsetSpan = $repeater->offset($span, 1, 'past'); $this->assertEquals('2006-07-16 14:00:00', (string)$offsetSpan->begin); $this->assertEquals('2006-07-16 14:01:00', (string)$offsetSpan->end); } } Horde_Date-2.0.7/test/Horde/Date/Repeater/TimeTest.php0000664000175000017500000000473212227212720020540 0ustar janjannow = new Horde_Date('2006-08-16 14:00:00'); } public function testNextFuture() { $t = new Horde_Date_Repeater_Time('4:00'); $t->now = $this->now; $this->assertEquals('2006-08-16 16:00:00', (string)$t->next('future')->begin); $this->assertEquals('2006-08-17 04:00:00', (string)$t->next('future')->begin); $t = new Horde_Date_Repeater_Time('13:00'); $t->now = $this->now; $this->assertEquals('2006-08-17 13:00:00', (string)$t->next('future')->begin); $this->assertEquals('2006-08-18 13:00:00', (string)$t->next('future')->begin); $t = new Horde_Date_Repeater_Time('0400'); $t->now = $this->now; $this->assertEquals('2006-08-17 04:00:00', (string)$t->next('future')->begin); $this->assertEquals('2006-08-18 04:00:00', (string)$t->next('future')->begin); } public function testNextPast() { $t = new Horde_Date_Repeater_Time('4:00'); $t->now = $this->now; $this->assertEquals('2006-08-16 04:00:00', (string)$t->next('past')->begin); $this->assertEquals('2006-08-15 16:00:00', (string)$t->next('past')->begin); $t = new Horde_Date_Repeater_Time('13:00'); $t->now = $this->now; $this->assertEquals('2006-08-16 13:00:00', (string)$t->next('past')->begin); $this->assertEquals('2006-08-15 13:00:00', (string)$t->next('past')->begin); } public function testType() { $t = new Horde_Date_Repeater_Time('4'); $this->assertEquals(14400, $t->type); $t = new Horde_Date_Repeater_Time('14'); $this->assertEquals(50400, $t->type); $t = new Horde_Date_Repeater_Time('4:00'); $this->assertEquals(14400, $t->type); $t = new Horde_Date_Repeater_Time('4:30'); $this->assertEquals(16200, $t->type); $t = new Horde_Date_Repeater_Time('1400'); $this->assertEquals(50400, $t->type); $t = new Horde_Date_Repeater_Time('0400'); $this->assertEquals(14400, $t->type); $t = new Horde_Date_Repeater_Time('04'); $this->assertEquals(14400, $t->type); $t = new Horde_Date_Repeater_Time('400'); $this->assertEquals(14400, $t->type); } } Horde_Date-2.0.7/test/Horde/Date/Repeater/WeekendTest.php0000664000175000017500000000551712227212720021226 0ustar janjannow = new Horde_Date('2006-08-16 14:00:00'); } public function testNextFuture() { $weekend = new Horde_Date_Repeater_Weekend(); $weekend->now = $this->now; $nextWeekend = $weekend->next('future'); $this->assertEquals('2006-08-19 00:00:00', (string)$nextWeekend->begin); $this->assertEquals('2006-08-21 00:00:00', (string)$nextWeekend->end); } public function testNextPast() { $weekend = new Horde_Date_Repeater_Weekend(); $weekend->now = $this->now; $lastWeekend = $weekend->next('past'); $this->assertEquals('2006-08-12 00:00:00', (string)$lastWeekend->begin); $this->assertEquals('2006-08-14 00:00:00', (string)$lastWeekend->end); } public function testThisFuture() { $weekend = new Horde_Date_Repeater_Weekend(); $weekend->now = $this->now; $thisWeekend = $weekend->this('future'); $this->assertEquals('2006-08-19 00:00:00', (string)$thisWeekend->begin); $this->assertEquals('2006-08-21 00:00:00', (string)$thisWeekend->end); } public function testThisPast() { $weekend = new Horde_Date_Repeater_Weekend(); $weekend->now = $this->now; $thisWeekend = $weekend->this('past'); $this->assertEquals('2006-08-12 00:00:00', (string)$thisWeekend->begin); $this->assertEquals('2006-08-14 00:00:00', (string)$thisWeekend->end); } public function testThisNone() { $weekend = new Horde_Date_Repeater_Weekend(); $weekend->now = $this->now; $thisWeekend = $weekend->this('none'); $this->assertEquals('2006-08-19 00:00:00', (string)$thisWeekend->begin); $this->assertEquals('2006-08-21 00:00:00', (string)$thisWeekend->end); } public function testOffset() { $weekend = new Horde_Date_Repeater_Weekend(); $span = new Horde_Date_Span($this->now, $this->now->add(1)); $offsetSpan = $weekend->offset($span, 3, 'future'); $this->assertEquals('2006-09-02 00:00:00', (string)$offsetSpan->begin); $this->assertEquals('2006-09-02 00:00:01', (string)$offsetSpan->end); $offsetSpan = $weekend->offset($span, 1, 'past'); $this->assertEquals('2006-08-12 00:00:00', (string)$offsetSpan->begin); $this->assertEquals('2006-08-12 00:00:01', (string)$offsetSpan->end); $offsetSpan = $weekend->offset($span, 0, 'future'); $this->assertEquals('2006-08-12 00:00:00', (string)$offsetSpan->begin); $this->assertEquals('2006-08-12 00:00:01', (string)$offsetSpan->end); } } Horde_Date-2.0.7/test/Horde/Date/Repeater/WeekTest.php0000664000175000017500000000462312227212720020534 0ustar janjannow = new Horde_Date('2006-08-16 14:00:00'); } public function testNextFuture() { $weeks = new Horde_Date_Repeater_Week(); $weeks->now = $this->now; $nextWeek = $weeks->next('future'); $this->assertEquals('2006-08-20 00:00:00', (string)$nextWeek->begin); $this->assertEquals('2006-08-27 00:00:00', (string)$nextWeek->end); $nextNextWeek = $weeks->next('future'); $this->assertEquals('2006-08-27 00:00:00', (string)$nextNextWeek->begin); $this->assertEquals('2006-09-03 00:00:00', (string)$nextNextWeek->end); } public function testNextPast() { $weeks = new Horde_Date_Repeater_Week(); $weeks->now = $this->now; $lastWeek = $weeks->next('past'); $this->assertEquals('2006-08-06 00:00:00', (string)$lastWeek->begin); $this->assertEquals('2006-08-13 00:00:00', (string)$lastWeek->end); $lastLastWeek = $weeks->next('past'); $this->assertEquals('2006-07-30 00:00:00', (string)$lastLastWeek->begin); $this->assertEquals('2006-08-06 00:00:00', (string)$lastLastWeek->end); } public function testThisFuture() { $weeks = new Horde_Date_Repeater_Week(); $weeks->now = $this->now; $thisWeek = $weeks->this('future'); $this->assertEquals('2006-08-16 15:00:00', (string)$thisWeek->begin); $this->assertEquals('2006-08-20 00:00:00', (string)$thisWeek->end); } public function testThisPast() { $weeks = new Horde_Date_Repeater_Week(); $weeks->now = $this->now; $thisWeek = $weeks->this('past'); $this->assertEquals('2006-08-13 00:00:00', (string)$thisWeek->begin); $this->assertEquals('2006-08-16 14:00:00', (string)$thisWeek->end); } public function testOffset() { $weeks = new Horde_Date_Repeater_Week(); $span = new Horde_Date_Span($this->now, $this->now->add(1)); $offsetSpan = $weeks->offset($span, 3, 'future'); $this->assertEquals('2006-09-06 14:00:00', (string)$offsetSpan->begin); $this->assertEquals('2006-09-06 14:00:01', (string)$offsetSpan->end); } } Horde_Date-2.0.7/test/Horde/Date/Repeater/YearTest.php0000664000175000017500000000474212227212720020543 0ustar janjannow = new Horde_Date('2006-08-16 14:00:00'); } public function testNextFuture() { $years = new Horde_Date_Repeater_Year(); $years->now = $this->now; $nextYear = $years->next('future'); $this->assertEquals('2007-01-01', $nextYear->begin->format('Y-m-d')); $this->assertEquals('2008-01-01', $nextYear->end->format('Y-m-d')); $nextNextYear = $years->next('future'); $this->assertEquals('2008-01-01', $nextNextYear->begin->format('Y-m-d')); $this->assertEquals('2009-01-01', $nextNextYear->end->format('Y-m-d')); } public function testNextPast() { $years = new Horde_Date_Repeater_Year(); $years->now = $this->now; $lastYear = $years->next('past'); $this->assertEquals('2005-01-01', $lastYear->begin->format('Y-m-d')); $this->assertEquals('2006-01-01', $lastYear->end->format('Y-m-d')); $lastLastYear = $years->next('past'); $this->assertEquals('2004-01-01', $lastLastYear->begin->format('Y-m-d')); $this->assertEquals('2005-01-01', $lastLastYear->end->format('Y-m-d')); } public function testThis() { $years = new Horde_Date_Repeater_Year(); $years->now = $this->now; $thisYear = $years->this('future'); $this->assertEquals('2006-08-17', $thisYear->begin->format('Y-m-d')); $this->assertEquals('2007-01-01', $thisYear->end->format('Y-m-d')); $thisYear = $years->this('past'); $this->assertEquals('2006-01-01', $thisYear->begin->format('Y-m-d')); $this->assertEquals('2006-08-16', $thisYear->end->format('Y-m-d')); } public function testOffset() { $span = new Horde_Date_Span($this->now, $this->now->add(1)); $years = new Horde_Date_Repeater_Year(); $offsetSpan = $years->offset($span, 3, 'future'); $this->assertEquals('2009-08-16 14:00:00', (string)$offsetSpan->begin); $this->assertEquals('2009-08-16 14:00:01', (string)$offsetSpan->end); $offsetSpan = $years->offset($span, 10, 'past'); $this->assertEquals('1996-08-16 14:00:00', (string)$offsetSpan->begin); $this->assertEquals('1996-08-16 14:00:01', (string)$offsetSpan->end); } } Horde_Date-2.0.7/test/Horde/Date/AllTests.php0000664000175000017500000000013212227212720016754 0ustar janjanrun(); Horde_Date-2.0.7/test/Horde/Date/bootstrap.php0000664000175000017500000000014312227212720017240 0ustar janjan_oldTimezone = date_default_timezone_get(); date_default_timezone_set('Europe/Berlin'); } public function tearDown() { date_default_timezone_set($this->_oldTimezone); } public function testConstructor() { $date = new stdClass(); $date->year = 2001; $date->month = 2; $date->mday = 3; $date->hour = 4; $date->min = 5; $date->sec = 6; $this->assertEquals('2001-02-03 04:05:06', (string)new Horde_Date($date)); $this->assertEquals('2001-02-03 04:05:06', (string)new Horde_Date((array)$date)); $this->assertEquals('2001-02-03 04:05:06', (string)new Horde_Date(array('year' => 2001, 'month' => 2, 'day' => 3, 'hour' => 4, 'minute' => 5, 'sec' => 6))); $this->assertEquals('2001-02-03 04:05:06', (string)new Horde_Date('20010203040506')); $this->assertEquals('2001-02-03 04:05:06', (string)new Horde_Date('20010203T040506Z')); $this->assertEquals('2001-02-03 04:05:06', (string)new Horde_Date('2001-02-03 04:05:06')); $this->assertEquals('2001-02-03 04:05:06', (string)new Horde_Date(981169506)); $date = new Horde_Date('2011-11-08 14:54:00 +0000'); $date->setTimezone('UTC'); $this->assertEquals('2011-11-08 14:54:00', (string)$date); $date = new Horde_Date('20010203T040506Z'); $this->assertEquals('UTC', $date->timezone); $date->setTimezone('America/New_York'); $newDate = new Horde_Date($date); $this->assertEquals('America/New_York', $newDate->timezone); $newDate->setTimezone('UTC'); $this->assertEquals('2001-02-03 04:05:06', (string)$newDate); /* Test creating Horde_Date from DateTime with timezone explicitly set */ $dt = new DateTime('2011-12-10T04:05:06', new DateTimeZone('Europe/Berlin')); $dt->setTimezone(new DateTimeZone('UTC')); $date = new Horde_Date($dt); $this->assertEquals('2011-12-10 03:05:06', (string)$date); } /** * Test creating a Horde_Date object representing the transition time * from DST to Standard Time * */ public function testTZChangeDuringTransition() { // Standardize tz $oldtz = date_default_timezone_get(); date_default_timezone_set('America/New_York'); // This is a transition for America/New_York from EDST -> EST as // returned from DateTimeZone::getTransitions() // This one fails // $date = new Horde_Date('2011-11-06T06:00:00+0000'); // $date->setTimezone('UTC'); // $this->assertEquals('2011-11-06 06:00:00', (string)$date); // Even adjusting the minutes so the time is after the transition // doesn't help // $date = new Horde_Date('2011-11-06T06:10:00+0000'); // $date->setTimezone('UTC'); // $this->assertEquals('2011-11-06 06:10:00', (string)$date); // Once we pass the actual hour, it works $date = new Horde_Date('2011-11-06T07:00:00+0000'); $date->setTimezone('UTC'); $this->assertEquals('2011-11-06 07:00:00', (string)$date); // This one works $date = new Horde_Date('2011-03-13T07:00:00+0000'); $date->setTimezone('UTC'); $this->assertEquals('2011-03-13 07:00:00', (string)$date); date_default_timezone_set($oldtz); } public function testDateCorrection() { $d = new Horde_Date('2008-01-01 00:00:00'); $d->month -= 2; $this->assertEquals(2007, $d->year); $d = new Horde_Date('2008-01-01 00:00:00'); $d->day -= 1; $this->assertEquals(2007, $d->year); $this->assertEquals(12, $d->month); $d = new Horde_Date('2008-01-01 00:00:00'); $d->day += 370; $this->assertEquals(2009, $d->year); $this->assertEquals(1, $d->month); $d->day += 10000000; $this->assertEquals(29388, $d->year); $this->assertEquals(1, $d->month); $d = new Horde_Date('2008-01-01 00:00:00'); $d->sec += 14400; $this->assertEquals(0, $d->sec); $this->assertEquals(0, $d->min); $this->assertEquals(4, $d->hour); $d = new Horde_Date('2011-03-31 00:00:00'); $d->month += 1; $this->assertEquals(5, $d->month); $this->assertEquals(1, $d->day); $d = new Horde_Date('2011-03-31 00:00:00'); $d->month -= 1; $this->assertEquals(2, $d->month); $this->assertEquals(28, $d->day); $d = new Horde_Date('2011-02-28 00:00:00'); $d->day += 1; $this->assertEquals(3, $d->month); $this->assertEquals(1, $d->day); $d = new Horde_Date('2011-03-01 00:00:00'); $d->day -= 1; $this->assertEquals(2, $d->month); $this->assertEquals(28, $d->day); } public function testTimestamp() { $oldTimezone = date_default_timezone_get(); date_default_timezone_set('America/New_York'); $date = new Horde_Date(array('mday' => 1, 'month' => 10, 'year' => 2004)); $this->assertEquals('1096603200', $date->timestamp()); $this->assertEquals('1096603200', mktime(0, 0, 0, $date->month, $date->mday, $date->year)); $date = new Horde_Date(array('mday' => 1, 'month' => 5, 'year' => 1948)); $this->assertEquals('-683841600', $date->timestamp()); $this->assertEquals('-683841600', mktime(0, 0, 0, $date->month, $date->mday, $date->year)); date_default_timezone_set($oldTimezone); } public function testStrftime() { setlocale(LC_TIME, 'en_US.UTF-8'); $date = new Horde_Date('2001-02-03 16:05:06'); if (strpos(PHP_OS, 'WIN') === false) { $format = '%C%n%d%n%D%n%e%n%H%n%I%n%m%n%M%n%R%n%S%n%t%n%T%n%y%n%Y%n%%'; } else { $format = "%d\n%H\n%I\n%m\n%M\n%S\n%y\n%Y\n%%"; } $this->assertEquals(strftime($format, $date->timestamp()), $date->strftime($format)); if (strpos(PHP_OS, 'WIN') === false) { $format = '%b%n%B%n%p%n%r%n%x%n%X'; } else { $format = "%b\n%B\n%p\n%x\n%X"; } $this->assertEquals(strftime($format, $date->timestamp()), $date->strftime($format)); $date->year = 1899; $expected = array( '03', '16', '04', '02', '05', '06', '99', '1899', '%', ); $format = '%d%n%H%n%I%n%m%n%M%n%S%n%y%n%Y%n%%'; if (strpos(PHP_OS, 'WIN') === false) { $expected[] = '18'; $expected[] = '02/03/99'; $expected[] = ' 3'; $expected[] = '16:05'; $expected[] = "\t"; $expected[] = '16:05:06'; $format .= '%n%C%n%D%n%e%n%R%n%t%n%T'; } else { $format = str_replace('%n', "\n", $format); } $this->assertEquals($expected, explode("\n", $date->strftime($format))); } public function testStrftimeDe() { if (!setlocale(LC_TIME, 'de_DE.UTF-8')) { $this->markTestSkipped('de_DE locale not available.'); } $date = new Horde_Date('2001-02-03 16:05:06'); if (strpos(PHP_OS, 'WIN') === false) { $format = '%b%n%B%n%p%n%r%n%x%n%X'; } else { $format = "%b\n%B\n%p\n%x\n%X"; } $this->assertEquals(strftime($format, $date->timestamp()), $date->strftime($format)); } public function testStrftimeCs() { if (!function_exists('nl_langinfo')) { $this->markTestSkipped('nl_langinfo() not available.'); } if (!setlocale(LC_TIME, 'cs_CZ.UTF-8')) { $this->markTestSkipped('cs_CZ locale not available.'); } $date = new Horde_Date('2001-02-03 16:05:06'); $format = nl_langinfo(D_FMT); $this->assertEquals(strftime($format, $date->timestamp()), $date->strftime($format)); } public function testStrftimeUnsupported() { setlocale(LC_TIME, 'en_US.UTF-8'); $date = new Horde_Date('2001-02-03 16:05:06'); $this->assertEquals(strftime('%a', $date->timestamp()), $date->strftime('%a')); } public function testSetTimezone() { $oldTimezone = date_default_timezone_get(); date_default_timezone_set('America/New_York'); $date = new Horde_Date('20010203040506'); $this->assertEquals('2001-02-03 04:05:06', (string)$date); $date->setTimezone('Europe/Berlin'); $this->assertEquals('2001-02-03 10:05:06', (string)$date); $date = new Horde_Date('20010203040506', 'UTC'); $this->assertEquals('2001-02-03 04:05:06', (string)$date); $date->setTimezone('Europe/Berlin'); $this->assertEquals('2001-02-03 05:05:06', (string)$date); date_default_timezone_set($oldTimezone); } public function testDateMath() { $d = new Horde_Date('2008-01-01 00:00:00'); $this->assertEquals('2007-12-31 00:00:00', (string)$d->sub(array('day' => 1))); $this->assertEquals('2009-01-01 00:00:00', (string)$d->add(array('year' => 1))); $this->assertEquals('2008-01-01 04:00:00', (string)$d->add(14400)); $span = new Horde_Date_Span('2006-01-01 00:00:00', '2006-08-16 00:00:00'); $this->assertEquals('2006-04-24 11:30:00', (string)$span->begin->add($span->width() / 2)); } public function testSetNthWeekday() { $date = new Horde_Date('2004-10-01'); $date->setNthWeekday(Horde_Date::DATE_SATURDAY); $this->assertEquals(2, $date->mday); $date->setNthWeekday(Horde_Date::DATE_SATURDAY, 2); $this->assertEquals(9, $date->mday); $date = new Horde_Date('2007-04-01'); $date->setNthWeekday(Horde_Date::DATE_THURSDAY); $this->assertEquals(5, $date->mday); } public function testToiCalendar() { $test = new Horde_Date('20100101130000'); $this->assertEquals('20100101T130000', $test->toiCalendar(true)); $this->assertEquals('20100101T120000Z', $test->toiCalendar(false)); $test = new Horde_Date('20100101130000', 'America/Argentina/Buenos_Aires'); $this->assertEquals('20100101T130000', $test->toiCalendar(true)); $this->assertEquals('20100101T160000Z', $test->toiCalendar(false)); } } Horde_Date-2.0.7/test/Horde/Date/phpunit.xml0000664000175000017500000000005612227212720016726 0ustar janjan Horde_Date-2.0.7/test/Horde/Date/RecurrenceTest.php0000664000175000017500000014021412227212720020164 0ustar janjanical = new Horde_Icalendar(); $this->_oldTimezone = date_default_timezone_get(); date_default_timezone_set('Europe/Berlin'); } public function tearDown() { date_default_timezone_set($this->_oldTimezone); } private function _getRecurrences($r) { $recurrences = array(); $protect = 0; // This is a Thursday $next = new Horde_Date('2007-03-01 00:00:00'); while ($next = $r->nextRecurrence($next)) { if (++$protect > 20) { return 'Infinite loop'; } $recurrences[] = (string)$next; $next->mday++; } return $recurrences; } public function testDailyEnd() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_DAILY); $r->setRecurInterval(2); $r->setRecurEnd(new Horde_Date('2007-03-07 10:00:00')); $this->assertEquals('D2 20070307T090000Z', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=DAILY;INTERVAL=2;UNTIL=20070307T090000Z', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2007-03-03 10:00:00', '2007-03-05 10:00:00', '2007-03-07 10:00:00'), $this->_getRecurrences($r)); $r->setRecurCount(4); } public function testDailyCount() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_DAILY); $r->setRecurInterval(2); $r->setRecurCount(4); $this->assertEquals('D2 #4', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=DAILY;INTERVAL=2;COUNT=4', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2007-03-03 10:00:00', '2007-03-05 10:00:00', '2007-03-07 10:00:00'), $this->_getRecurrences($r)); } public function testWeeklyEnd() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY); $r->setRecurOnDay(Horde_Date::MASK_THURSDAY); $r->setRecurInterval(1); $r->setRecurEnd(new Horde_Date('2007-03-29 10:00:00')); $this->assertEquals('W1 TH 20070329T080000Z', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=WEEKLY;INTERVAL=1;BYDAY=TH;UNTIL=20070329T080000Z', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2007-03-08 10:00:00', '2007-03-15 10:00:00', '2007-03-22 10:00:00', '2007-03-29 10:00:00'), $this->_getRecurrences($r)); $r = new Horde_Date_Recurrence('2009-09-28 08:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY); $r->setRecurOnDay(Horde_Date::MASK_MONDAY | Horde_Date::MASK_TUESDAY | Horde_Date::MASK_WEDNESDAY | Horde_Date::MASK_THURSDAY | Horde_Date::MASK_FRIDAY); $r->setRecurInterval(7); $r->setRecurEnd(new Horde_Date('2010-02-05 00:00:00')); $this->assertEquals(array( '2009-09-28 08:00:00', '2009-09-29 08:00:00', '2009-09-30 08:00:00', '2009-10-01 08:00:00', '2009-10-02 08:00:00', '2009-11-16 08:00:00', '2009-11-17 08:00:00', '2009-11-18 08:00:00', '2009-11-19 08:00:00', '2009-11-20 08:00:00', '2010-01-04 08:00:00', '2010-01-05 08:00:00', '2010-01-06 08:00:00', '2010-01-07 08:00:00', '2010-01-08 08:00:00', ), $this->_getRecurrences($r), 'Test for bug #8546'); } public function testWeeklyCount() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY); $r->setRecurOnDay(Horde_Date::MASK_THURSDAY); $r->setRecurInterval(1); $r->setRecurCount(4); $this->assertEquals('W1 TH #4', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=WEEKLY;INTERVAL=1;BYDAY=TH;COUNT=4', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2007-03-08 10:00:00', '2007-03-15 10:00:00', '2007-03-22 10:00:00'), $this->_getRecurrences($r)); $r->setRecurInterval(2); $this->assertEquals('W2 TH #4', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=WEEKLY;INTERVAL=2;BYDAY=TH;COUNT=4', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2007-03-15 10:00:00', '2007-03-29 10:00:00', '2007-04-12 10:00:00'), $this->_getRecurrences($r)); } public function testWeeklyCountWithMultipleIncidencesPerWeekIfTheFirstIncidenceInThisWeekHasAlreadyPassed() { $r = new Horde_Date_Recurrence('2007-03-03 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY); $r->setRecurOnDay(Horde_Date::MASK_MONDAY | Horde_Date::MASK_SATURDAY); $r->setRecurInterval(1); $r->setRecurCount(3); $this->assertEquals('W1 MO SA #3', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,SA;COUNT=3', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-03 10:00:00', '2007-03-05 10:00:00', '2007-03-10 10:00:00',), $this->_getRecurrences($r)); } public function testWeeklyCountWithMultipleIncidencesPerWeek() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY); $r->setRecurOnDay(Horde_Date::MASK_THURSDAY | Horde_Date::MASK_SATURDAY); $r->setRecurInterval(1); $r->setRecurCount(3); $this->assertEquals('W1 TH SA #3', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=WEEKLY;INTERVAL=1;BYDAY=TH,SA;COUNT=3', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2007-03-03 10:00:00', '2007-03-08 10:00:00',), $this->_getRecurrences($r)); } public function testWeeklyCountWithMultipleIncidencesPerWeekAndIntervalLargerOne() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY); $r->setRecurOnDay(Horde_Date::MASK_THURSDAY | Horde_Date::MASK_SATURDAY); $r->setRecurInterval(2); $r->setRecurCount(3); $this->assertEquals('W2 TH SA #3', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=WEEKLY;INTERVAL=2;BYDAY=TH,SA;COUNT=3', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2007-03-03 10:00:00', '2007-03-15 10:00:00',), $this->_getRecurrences($r)); } public function testWeeklyCountWithMultipleIncidencesPerWeekAndLastWeekIsComplete() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY); $r->setRecurOnDay(Horde_Date::MASK_THURSDAY | Horde_Date::MASK_SATURDAY); $r->setRecurInterval(1); $r->setRecurCount(4); $this->assertEquals('W1 TH SA #4', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=WEEKLY;INTERVAL=1;BYDAY=TH,SA;COUNT=4', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2007-03-03 10:00:00', '2007-03-08 10:00:00', '2007-03-10 10:00:00'), $this->_getRecurrences($r)); } public function testWeeklyCountWithMultipleIncidencesPerWeekIfNextIncidenceIsNextDay() { $r = new Horde_Date_Recurrence('2009-11-11 06:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY); $r->setRecurOnDay(Horde_Date::MASK_WEDNESDAY | Horde_Date::MASK_THURSDAY); $r->setRecurInterval(1); $r->setRecurCount(6); $this->assertEquals('W1 WE TH #6', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=WEEKLY;INTERVAL=1;BYDAY=WE,TH;COUNT=6', $r->toRRule20($this->ical)); $this->assertEquals(array('2009-11-11 06:00:00', '2009-11-12 06:00:00', '2009-11-18 06:00:00', '2009-11-19 06:00:00', '2009-11-25 06:00:00', '2009-11-26 06:00:00'), $this->_getRecurrences($r)); } public function testWeeklyCountWithMultipleIncidencesPerWeekIfNextIncidenceIsBeginningOfWeek() { $r = new Horde_Date_Recurrence('2009-11-09 06:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY); $r->setRecurOnDay( Horde_Date::MASK_MONDAY | Horde_Date::MASK_TUESDAY | Horde_Date::MASK_WEDNESDAY | Horde_Date::MASK_THURSDAY | Horde_Date::MASK_FRIDAY ); $r->setRecurInterval(1); $r->setRecurCount(6); $this->assertEquals('W1 MO TU WE TH FR #6', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR;COUNT=6', $r->toRRule20($this->ical)); $this->assertEquals(array('2009-11-09 06:00:00', '2009-11-10 06:00:00', '2009-11-11 06:00:00', '2009-11-12 06:00:00', '2009-11-13 06:00:00', '2009-11-16 06:00:00'), $this->_getRecurrences($r)); } public function testWeeklyCountWithMultipleIncidencesPerWeekAndCountIsOne() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY); $r->setRecurOnDay(Horde_Date::MASK_THURSDAY | Horde_Date::MASK_SATURDAY); $r->setRecurInterval(1); $r->setRecurCount(1); $this->assertEquals('W1 TH SA #1', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=WEEKLY;INTERVAL=1;BYDAY=TH,SA;COUNT=1', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00'), $this->_getRecurrences($r)); } public function testBiweeklySundayEvent() { $r = new Horde_Date_Recurrence('2009-11-29 06:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY); $r->setRecurOnDay(Horde_Date::MASK_SUNDAY); $r->setRecurInterval(2); $r->setRecurCount(3); $this->assertEquals('W2 SU #3', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=WEEKLY;INTERVAL=2;BYDAY=SU;COUNT=3', $r->toRRule20($this->ical)); $this->assertEquals(array('2009-11-29 06:00:00', '2009-12-13 06:00:00', '2009-12-27 06:00:00'), $this->_getRecurrences($r)); } public function testBug8799WeeklyISOWeek52() { // Friday, 2010-12-31 is in week 52, but the next recurrence is in // the NEW year (2011). $r = new Horde_Date_Recurrence('2010-06-04 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY); $r->setRecurOnDay(Horde_Date::MASK_FRIDAY); $r->setRecurInterval(1); $after = new Horde_Date('12/21/2010'); for ($i = 0; $i <= 5; $i++) { $after = $r->nextRecurrence($after); $recurrences[] = (string)$after; $after->mday++; } $this->assertEquals(array('2010-12-24 10:00:00', '2010-12-31 10:00:00', '2011-01-07 10:00:00', '2011-01-14 10:00:00', '2011-01-21 10:00:00', '2011-01-28 10:00:00'), $recurrences); // The entire first week of Jan, 2012 is ISO Week 52 $after = new Horde_Date('01/01/2012'); $recurrences = array(); for ($i = 0; $i <= 5; $i++) { $after = $r->nextRecurrence($after); $recurrences[] = (string)$after; $after->mday++; } $this->assertEquals(array('2012-01-06 10:00:00', '2012-01-13 10:00:00', '2012-01-20 10:00:00', '2012-01-27 10:00:00', '2012-02-03 10:00:00', '2012-02-10 10:00:00'), $recurrences); } public function testWeeklyISOWeek53() { $r = new Horde_Date_Recurrence('2009-06-09 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY); $r->setRecurOnDay(Horde_Date::MASK_TUESDAY); $r->setRecurInterval(1); $recurrences = array(); $after = new Horde_Date('1/1/2010'); $after = (string)$r->nextRecurrence($after); $this->assertEquals('2010-01-05 10:00:00', $after); } public function testMonthlyEnd() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_MONTHLY_DATE); $r->setRecurInterval(1); $r->setRecurEnd(new Horde_Date('2007-05-01 10:00:00')); $this->assertEquals('MD1 1 20070501T080000Z', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=MONTHLY;INTERVAL=1;UNTIL=20070501T080000Z', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2007-04-01 10:00:00', '2007-05-01 10:00:00'), $this->_getRecurrences($r)); } public function testMonthlyCount() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_MONTHLY_DATE); $r->setRecurInterval(1); $r->setRecurCount(4); $this->assertEquals('MD1 1 #4', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=MONTHLY;INTERVAL=1;COUNT=4', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2007-04-01 10:00:00', '2007-05-01 10:00:00', '2007-06-01 10:00:00'), $this->_getRecurrences($r)); $r->setRecurInterval(2); $this->assertEquals('MD2 1 #4', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=MONTHLY;INTERVAL=2;COUNT=4', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2007-05-01 10:00:00', '2007-07-01 10:00:00', '2007-09-01 10:00:00'), $this->_getRecurrences($r)); } public function testMonthlyDayEnd() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_MONTHLY_WEEKDAY); $r->setRecurInterval(1); $r->setRecurEnd(new Horde_Date('2007-05-01 10:00:00')); $this->assertEquals('MP1 1+ TH 20070501T080000Z', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=MONTHLY;INTERVAL=1;BYDAY=1TH;UNTIL=20070501T080000Z', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2007-04-05 10:00:00'), $this->_getRecurrences($r)); } public function testMonthlyDayCount() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_MONTHLY_WEEKDAY); $r->setRecurInterval(1); $r->setRecurCount(4); $this->assertEquals('MP1 1+ TH #4', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=MONTHLY;INTERVAL=1;BYDAY=1TH;COUNT=4', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2007-04-05 10:00:00', '2007-05-03 10:00:00', '2007-06-07 10:00:00'), $this->_getRecurrences($r)); $r = new Horde_Date_Recurrence('2008-03-14 12:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_MONTHLY_WEEKDAY); $r->setRecurCount(2); $this->assertEquals('MP1 2+ FR #2', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=MONTHLY;INTERVAL=1;BYDAY=2FR;COUNT=2', $r->toRRule20($this->ical)); } /** * @see http://bugs.horde.org/ticket/11181 */ public function testMonthlyWeekdayFifth() { $r = new Horde_Date_Recurrence('2012-05-31 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_MONTHLY_WEEKDAY); $r->setRecurInterval(1); $this->assertEquals('MP1 5+ TH #0', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=MONTHLY;INTERVAL=1;BYDAY=5TH', $r->toRRule20($this->ical)); $next = new Horde_Date('2012-06-01 00:00:00'); $next = $r->nextRecurrence($next); $this->assertEquals('2012-08-30 10:00:00', (string)$next); $next->mday++; $next = $r->nextRecurrence($next); $this->assertEquals('2012-11-29 10:00:00', (string)$next); $next->mday++; $next = $r->nextRecurrence($next); $this->assertEquals('2013-01-31 10:00:00', (string)$next); } public function testYearlyDateNoEnd() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_YEARLY_DATE); $this->assertEquals('YM1 3 #0', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=YEARLY;INTERVAL=1', $r->toRRule20($this->ical)); } public function testYearlyDateEnd() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_YEARLY_DATE); $r->setRecurEnd(new Horde_Date('2009-03-01 10:00:00')); $this->assertEquals('YM1 3 20090301T090000Z', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=YEARLY;INTERVAL=1;UNTIL=20090301T090000Z', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2008-03-01 10:00:00', '2009-03-01 10:00:00'), $this->_getRecurrences($r)); } public function testYearlyDateCount() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_YEARLY_DATE); $r->setRecurCount(4); $this->assertEquals('YM1 3 #4', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=YEARLY;INTERVAL=1;COUNT=4', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2008-03-01 10:00:00', '2009-03-01 10:00:00', '2010-03-01 10:00:00'), $this->_getRecurrences($r)); $r = new Horde_Date_Recurrence('2007-04-25 12:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_YEARLY_DATE); $r->setRecurEnd(new Horde_Date('2011-04-25 23:00:00')); $r->setRecurInterval(2); $this->assertEquals('2009-04-25 12:00:00', (string)$r->nextRecurrence(new Horde_Date('2009-03-30 00:00:00'))); $r = new Horde_Date_Recurrence('2008-02-29 00:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_YEARLY_DATE); $r->setRecurInterval(1); $this->assertEquals('2012-02-29 00:00:00', (string)$r->nextRecurrence(new Horde_Date('2008-03-01 00:00:00'))); } public function testYearlyDayEnd() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_YEARLY_DAY); $r->setRecurEnd(new Horde_Date('2009-03-01 10:00:00')); $this->assertEquals('YD1 60 20090301T090000Z', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=YEARLY;INTERVAL=1;BYYEARDAY=60;UNTIL=20090301T090000Z', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2008-02-29 10:00:00', '2009-03-01 10:00:00'), $this->_getRecurrences($r)); } public function testYearlyDayCount() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_YEARLY_DAY); $r->setRecurCount(4); $this->assertEquals('YD1 60 #4', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=YEARLY;INTERVAL=1;BYYEARDAY=60;COUNT=4', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2008-02-29 10:00:00', '2009-03-01 10:00:00', '2010-03-01 10:00:00'), $this->_getRecurrences($r)); } public function testYearlyWeekEnd() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_YEARLY_WEEKDAY); $r->setRecurEnd(new Horde_Date('2009-03-01 10:00:00')); $this->assertEquals('', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=YEARLY;INTERVAL=1;BYDAY=1TH;BYMONTH=3;UNTIL=20090301T090000Z', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2008-03-06 10:00:00'), $this->_getRecurrences($r)); } public function testYearlyWeekCount() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_YEARLY_WEEKDAY); $r->setRecurCount(4); $this->assertEquals('', $r->toRRule10($this->ical)); $this->assertEquals('FREQ=YEARLY;INTERVAL=1;BYDAY=1TH;BYMONTH=3;COUNT=4', $r->toRRule20($this->ical)); $this->assertEquals(array('2007-03-01 10:00:00', '2008-03-06 10:00:00', '2009-03-05 10:00:00', '2010-03-04 10:00:00'), $this->_getRecurrences($r)); $r = new Horde_Date_Recurrence('2009-03-27 10:00:00'); $r->setRecurType(Horde_Date_Recurrence::RECUR_YEARLY_WEEKDAY); $r->setRecurCount(1); $this->assertEquals('FREQ=YEARLY;INTERVAL=1;BYDAY=4FR;BYMONTH=3;COUNT=1', $r->toRRule20($this->ical)); } public function testParseDaily() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->fromRRule10('D2 20070307'); $this->assertEquals(Horde_Date_Recurrence::RECUR_DAILY, $r->getRecurType()); $this->assertEquals(2, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-03-07 00:00:00', (string)$r->recurEnd); $r->fromRRule10('D2 20070308T090000Z'); $this->assertEquals(Horde_Date_Recurrence::RECUR_DAILY, $r->getRecurType()); $this->assertEquals(2, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-03-08 09:00:00', (string)$r->recurEnd); $r->fromRRule10('D2 #4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_DAILY, $r->getRecurType()); $this->assertEquals(2, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); $r->fromRRule20('FREQ=DAILY;INTERVAL=2;UNTIL=20070307'); $this->assertEquals(Horde_Date_Recurrence::RECUR_DAILY, $r->getRecurType()); $this->assertEquals(2, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-03-07 00:00:00', (string)$r->recurEnd); $r->fromRRule20('FREQ=DAILY;INTERVAL=2;UNTIL=20070308T090000Z'); $this->assertEquals(Horde_Date_Recurrence::RECUR_DAILY, $r->getRecurType()); $this->assertEquals(2, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-03-08 00:00:00', (string)$r->recurEnd); $r->fromRRule20('FREQ=DAILY;INTERVAL=2;COUNT=4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_DAILY, $r->getRecurType()); $this->assertEquals(2, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); } public function testParseWeekly() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->fromRRule10('W1 TH 20070329'); $this->assertEquals(Horde_Date_Recurrence::RECUR_WEEKLY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertEquals(Horde_Date::MASK_THURSDAY, $r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-03-29 00:00:00', (string)$r->recurEnd); $r->fromRRule10('W1 TH 20070330T080000Z'); $this->assertEquals(Horde_Date_Recurrence::RECUR_WEEKLY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertEquals(Horde_Date::MASK_THURSDAY, $r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-03-30 08:00:00', (string)$r->recurEnd); $r->fromRRule10('W1 SU MO TU WE TH FR SA 20070603T235959'); $this->assertEquals(Horde_Date_Recurrence::RECUR_WEEKLY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertEquals(Horde_Date::MASK_ALLDAYS, $r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-06-03 23:59:59', (string)$r->recurEnd); $r->fromRRule10('W1 TH #4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_WEEKLY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertEquals(Horde_Date::MASK_THURSDAY, $r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); $r->fromRRule10('W2 TH #4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_WEEKLY, $r->getRecurType()); $this->assertEquals(2, $r->getRecurInterval()); $this->assertEquals(Horde_Date::MASK_THURSDAY, $r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); $r->fromRRule20('FREQ=WEEKLY;INTERVAL=1;BYDAY=TH;UNTIL=20070329'); $this->assertEquals(Horde_Date_Recurrence::RECUR_WEEKLY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertEquals(Horde_Date::MASK_THURSDAY, $r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-03-29 00:00:00', (string)$r->recurEnd); $r->fromRRule20('FREQ=WEEKLY;INTERVAL=1;BYDAY=TH;UNTIL=20070330T080000Z'); $this->assertEquals(Horde_Date_Recurrence::RECUR_WEEKLY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertEquals(Horde_Date::MASK_THURSDAY, $r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-03-30 00:00:00', (string)$r->recurEnd); $r->fromRRule20('FREQ=WEEKLY;INTERVAL=1;BYDAY=TH;COUNT=4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_WEEKLY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertEquals(Horde_Date::MASK_THURSDAY, $r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); $r->fromRRule20('FREQ=WEEKLY;INTERVAL=2;BYDAY=TH;COUNT=4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_WEEKLY, $r->getRecurType()); $this->assertEquals(2, $r->getRecurInterval()); $this->assertEquals(Horde_Date::MASK_THURSDAY, $r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); } public function testParseWeeklyWithBrokenRule() { // Outlook (or the Funambol connector) create such rules with both, // date limit and count limit. $r = new Horde_Date_Recurrence('2010-10-13 08:00:00'); $r->fromRRule10('W1 WE 20101103T080000 #4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_WEEKLY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertEquals(Horde_Date::MASK_WEDNESDAY, $r->getRecurOnDays()); $this->assertEquals('2010-11-03 08:00:00', (string)$r->recurEnd); } public function testParseMonthlyDate() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->fromRRule10('MD1 1 20070501'); $this->assertEquals(Horde_Date_Recurrence::RECUR_MONTHLY_DATE, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-05-01 00:00:00', (string)$r->recurEnd); $r->fromRRule10('MD1 1 20070502T080000Z'); $this->assertEquals(Horde_Date_Recurrence::RECUR_MONTHLY_DATE, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-05-02 08:00:00', (string)$r->recurEnd); $r->fromRRule10('MD1 1 #4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_MONTHLY_DATE, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); $r->fromRRule10('MD2 1 #4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_MONTHLY_DATE, $r->getRecurType()); $this->assertEquals(2, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); $r->fromRRule20('FREQ=MONTHLY;INTERVAL=1;UNTIL=20070501'); $this->assertEquals(Horde_Date_Recurrence::RECUR_MONTHLY_DATE, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-05-01 00:00:00', (string)$r->recurEnd); $r->fromRRule20('FREQ=MONTHLY;INTERVAL=1;UNTIL=20070502T080000Z'); $this->assertEquals(Horde_Date_Recurrence::RECUR_MONTHLY_DATE, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-05-02 00:00:00', (string)$r->recurEnd); $r->fromRRule20('FREQ=MONTHLY;INTERVAL=1;COUNT=4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_MONTHLY_DATE, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); $r->fromRRule20('FREQ=MONTHLY;INTERVAL=2;COUNT=4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_MONTHLY_DATE, $r->getRecurType()); $this->assertEquals(2, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); } public function testParseMonthlyWeekday() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->fromRRule10('MP1 1+ TH 20070501'); $this->assertEquals(Horde_Date_Recurrence::RECUR_MONTHLY_WEEKDAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-05-01 00:00:00', (string)$r->recurEnd); $r->fromRRule10('MP1 1+ TH 20070502T080000Z'); $this->assertEquals(Horde_Date_Recurrence::RECUR_MONTHLY_WEEKDAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-05-02 08:00:00', (string)$r->recurEnd); $r->fromRRule10('MP1 1+ TH #4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_MONTHLY_WEEKDAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); $r->fromRRule20('FREQ=MONTHLY;INTERVAL=1;BYDAY=1TH;UNTIL=20070501'); $this->assertEquals(Horde_Date_Recurrence::RECUR_MONTHLY_WEEKDAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-05-01 00:00:00', (string)$r->recurEnd); $r->fromRRule20('FREQ=MONTHLY;INTERVAL=1;BYDAY=1TH;UNTIL=20070502T080000Z'); $this->assertEquals(Horde_Date_Recurrence::RECUR_MONTHLY_WEEKDAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2007-05-02 00:00:00', (string)$r->recurEnd); $r->fromRRule20('FREQ=MONTHLY;INTERVAL=1;BYDAY=1TH;COUNT=4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_MONTHLY_WEEKDAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); } public function testParseYearlyDate() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->fromRRule10('YM1 3 20090301'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_DATE, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2009-03-01 00:00:00', (string)$r->recurEnd); $r->fromRRule10('YM1 3 20090302T090000Z'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_DATE, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2009-03-02 09:00:00', (string)$r->recurEnd); $r->fromRRule10('YM1 3 #4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_DATE, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); $r->fromRRule20('FREQ=YEARLY;INTERVAL=1;UNTIL=20090301'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_DATE, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2009-03-01 00:00:00', (string)$r->recurEnd); $r->fromRRule20('FREQ=YEARLY;INTERVAL=1;UNTIL=20090302T090000Z'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_DATE, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2009-03-02 00:00:00', (string)$r->recurEnd); $r->fromRRule20('FREQ=YEARLY;INTERVAL=1;COUNT=4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_DATE, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); } public function testParseYearlyDay() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->fromRRule10('YD1 60 20090301'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_DAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2009-03-01 00:00:00', (string)$r->recurEnd); $r->fromRRule10('YD1 60 20090302T090000Z'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_DAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2009-03-02 09:00:00', (string)$r->recurEnd); $r->fromRRule10('YD1 60 #4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_DAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); $r->fromRRule20('FREQ=YEARLY;INTERVAL=1;BYYEARDAY=60;UNTIL=20090301'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_DAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2009-03-01 00:00:00', (string)$r->recurEnd); $r->fromRRule20('FREQ=YEARLY;INTERVAL=1;BYYEARDAY=60;UNTIL=20090302T090000Z'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_DAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2009-03-02 00:00:00', (string)$r->recurEnd); $r->fromRRule20('FREQ=YEARLY;INTERVAL=1;BYYEARDAY=60;COUNT=4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_DAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); } public function testParseYearlyWeekday() { $r = new Horde_Date_Recurrence('2007-03-01 10:00:00'); $r->fromRRule20('FREQ=YEARLY;INTERVAL=1;BYDAY=1TH;BYMONTH=3;UNTIL=20090301'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_WEEKDAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2009-03-01 00:00:00', (string)$r->recurEnd); $r->fromRRule20('FREQ=YEARLY;INTERVAL=1;BYDAY=1TH;BYMONTH=3;UNTIL=20090302T090000Z'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_WEEKDAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertNull($r->getRecurCount()); $this->assertEquals('2009-03-02 00:00:00', (string)$r->recurEnd); $r->fromRRule20('FREQ=YEARLY;INTERVAL=1;BYDAY=1TH;BYMONTH=3;COUNT=4'); $this->assertEquals(Horde_Date_Recurrence::RECUR_YEARLY_WEEKDAY, $r->getRecurType()); $this->assertEquals(1, $r->getRecurInterval()); $this->assertNull($r->getRecurOnDays()); $this->assertEquals(4, $r->getRecurCount()); } public function testHash() { $d = new Horde_Date(1970, 1, 1); $r = new Horde_Date_Recurrence(new Horde_Date(1970, 1, 1)); $r->setRecurType(Horde_Date_Recurrence::RECUR_DAILY); $r->addException(1970, 1, 1); $r->addException(1970, 1, 3); $r->addException(1970, 1, 4); $r->setRecurEnd(new Horde_Date(1970, 1, 4)); $s = new Horde_Date_Recurrence(new Horde_Date(1970, 1, 1)); $s->fromKolab($r->toKolab()); $this->assertTrue($s->hasRecurEnd()); $next = $s->nextRecurrence(new Horde_Date($s->start)); $this->assertEquals(1, $next->mday); $this->assertTrue($s->hasException($next->year, $next->month, $next->mday)); $next->mday++; $next = $s->nextRecurrence($next); $this->assertFalse($s->hasException($next->year, $next->month, $next->mday)); $next->mday++; $next = $s->nextRecurrence($next); $this->assertTrue($s->hasException($next->year, $next->month, $next->mday)); $next->mday++; $next = $s->nextRecurrence($next); $this->assertTrue($s->hasException($next->year, $next->month, $next->mday)); $this->assertEquals(3, count($s->getExceptions())); $this->assertTrue($s->hasActiveRecurrence()); $s->addException(1970, 1, 2); $this->assertFalse($s->hasActiveRecurrence()); } public function testHashMissingCycle() { $r = new Horde_Date_Recurrence(new Horde_Date(1970, 1, 1)); $r->fromKolab(array('interval' => 1, 'range-type' => 'none')); $this->assertEquals(Horde_Date_Recurrence::RECUR_NONE, $r->getRecurType()); } public function testHashMissingRangeType() { $r = new Horde_Date_Recurrence(new Horde_Date(1970, 1, 1)); $r->fromKolab(array('interval' => 1, 'cycle' => 'daily')); $this->assertEquals(Horde_Date_Recurrence::RECUR_DAILY, $r->getRecurType()); } /** */ public function testCompletions() { $r = new Horde_Date_Recurrence(new Horde_Date(1970, 1, 1)); $r->setRecurType(Horde_Date_Recurrence::RECUR_DAILY); $r->addCompletion(1970, 1, 2); $this->assertTrue($r->hasCompletion(1970, 1, 2)); $this->assertEquals(1, count($r->getCompletions())); $r->addCompletion(1970, 1, 4); $this->assertEquals(2, count($r->getCompletions())); $r->deleteCompletion(1970, 1, 2); $this->assertEquals(1, count($r->getCompletions())); $this->assertFalse($r->hasCompletion(1970, 1, 2)); $r->addCompletion(1970, 1, 2); $r->addException(1970, 1, 1); $r->addException(1970, 1, 3); $next = $r->nextRecurrence(new Horde_Date($r->start)); $this->assertEquals(1, $next->mday); $this->assertTrue($r->hasException($next->year, $next->month, $next->mday)); $next->mday++; $next = $r->nextRecurrence($next); $this->assertTrue($r->hasCompletion($next->year, $next->month, $next->mday)); $next->mday++; $next = $r->nextRecurrence($next); $this->assertTrue($r->hasException($next->year, $next->month, $next->mday)); $next->mday++; $next = $r->nextRecurrence($next); $this->assertTrue($r->hasCompletion($next->year, $next->month, $next->mday)); $r->setRecurEnd(new Horde_Date(1970, 1, 4)); $this->assertTrue($r->hasRecurEnd()); $this->assertFalse($r->hasActiveRecurrence()); $s = new Horde_Date_Recurrence(new Horde_Date(1970, 1, 1)); $s->fromKolab($r->toKolab()); $this->assertTrue($s->hasRecurEnd()); $next = $s->nextRecurrence(new Horde_Date($s->start)); $this->assertEquals(1, $next->mday); $this->assertTrue($s->hasException($next->year, $next->month, $next->mday)); $next->mday++; $next = $s->nextRecurrence($next); $this->assertTrue($s->hasCompletion($next->year, $next->month, $next->mday)); $next->mday++; $next = $s->nextRecurrence($next); $this->assertTrue($s->hasException($next->year, $next->month, $next->mday)); $next->mday++; $next = $s->nextRecurrence($next); $this->assertTrue($s->hasCompletion($next->year, $next->month, $next->mday)); $this->assertEquals(2, count($s->getCompletions())); $this->assertEquals(2, count($s->getExceptions())); $this->assertFalse($s->hasActiveRecurrence()); $this->assertEquals(2, count($s->getCompletions())); $s->deleteCompletion(1970, 1, 2); $this->assertEquals(1, count($s->getCompletions())); $s->deleteCompletion(1970, 1, 4); $this->assertEquals(0, count($s->getCompletions())); } public function testBug2813RecurrenceEndFromIcalendar() { require_once 'PEAR.php'; $iCal = new Horde_Icalendar(); $iCal->parsevCalendar(file_get_contents(__DIR__ . '/fixtures/bug2813.ics')); $components = $iCal->getComponents(); date_default_timezone_set('US/Eastern'); foreach ($components as $content) { if ($content instanceof Horde_Icalendar_Vevent) { $start = new Horde_Date($content->getAttribute('DTSTART')); $end = new Horde_Date($content->getAttribute('DTEND')); $rrule = $content->getAttribute('RRULE'); $recurrence = new Horde_Date_Recurrence($start, $end); $recurrence->fromRRule20($rrule); break; } } $after = array('year' => 2006, 'month' => 6); $after['mday'] = 16; $this->assertEquals('2006-06-16 18:00:00', (string)$recurrence->nextRecurrence($after)); $after['mday'] = 17; $this->assertEquals('2006-06-17 18:00:00', (string)$recurrence->nextRecurrence($after)); $after['mday'] = 18; $this->assertEquals('', (string)$recurrence->nextRecurrence($after)); } public function testBug4626MonthlyByDayRRule() { $rrule = new Horde_Date_Recurrence('2008-04-05 00:00:00'); $rrule->setRecurType(Horde_Date_Recurrence::RECUR_MONTHLY_WEEKDAY); $rrule->setRecurOnDay(Horde_Date::MASK_SATURDAY); $this->assertEquals('MP1 1+ SA #0', $rrule->toRRule10(new Horde_Icalendar())); $this->assertEquals('FREQ=MONTHLY;INTERVAL=1;BYDAY=1SA', $rrule->toRRule20(new Horde_Icalendar())); } public function testNextRecurrenceDifferentTimezones() { // Every 2 week recurring event that starts at 1am localtime date_default_timezone_set('America/New_York'); $rrule = new Horde_Date_Recurrence('2009-12-30 00:00:00'); $rrule->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY); $rrule->setRecurOnDay(Horde_Date::MASK_WEDNESDAY); $rrule->setRecurInterval(2); // Date to get recurrences after in UTC $after = new Horde_Date('2011-02-09'); $after->setTimezone('UTC'); $next = $rrule->nextRecurrence($after); $this->assertInstanceOf('Horde_Date', $next); $this->assertEquals($next->mday, 9); date_default_timezone_set('Europe/Berlin'); } public function testRecurrenceObjectWithNonDefaultTimezones() { // date_default_timezone_get is Europe/Berlin $date = new Horde_Date('2011-10-01T15:00:00', 'America/New_York'); $rrule = new Horde_Date_Recurrence($date); $rrule->setRecurType(Horde_Date_Recurrence::RECUR_WEEKLY); $rrule->setRecurOnDay(Horde_Date::MASK_SATURDAY); $rrule->setRecurInterval(2); $after = new Horde_Date('2011-10-16'); $next = $rrule->nextRecurrence($after); $this->assertInstanceOf('Horde_Date', $next); $this->assertEquals('2011-10-29 15:00:00', (string)$next); $this->assertEquals('America/New_York', $next->timezone); } } Horde_Date-2.0.7/test/Horde/Date/SpanTest.php0000664000175000017500000000226712227212720016775 0ustar janjanassertEquals(60 * 60 * 24, $s->width()); } public function testIncludes() { $s = new Horde_Date_Span(new Horde_Date('2006-08-16 00:00:00'), new Horde_Date('2006-08-17 00:00:00')); $this->assertTrue($s->includes(new Horde_Date('2006-08-16 12:00:00'))); $this->assertFalse($s->includes(new Horde_Date('2006-08-15 00:00:00'))); $this->assertFalse($s->includes(new Horde_Date('2006-08-18 00:00:00'))); } public function testSpanMath() { $s = new Horde_Date_Span(new Horde_Date(1), new Horde_Date(2)); $this->assertEquals(2, $s->add(1)->begin->timestamp()); $this->assertEquals(3, $s->add(1)->end->timestamp()); $this->assertEquals(0, $s->sub(1)->begin->timestamp()); $this->assertEquals(1, $s->sub(1)->end->timestamp()); } } Horde_Date-2.0.7/test/Horde/Date/UtilsTest.php0000664000175000017500000000125712227212720017172 0ustar janjanassertEquals('2006-01-02', Horde_Date_Utils::firstDayOfWeek(1, 2006)->format('Y-m-d')); $this->assertEquals('2007-01-01', Horde_Date_Utils::firstDayOfWeek(1, 2007)->format('Y-m-d')); $this->assertEquals('2007-12-31', Horde_Date_Utils::firstDayOfWeek(1, 2008)->format('Y-m-d')); $this->assertEquals('2010-01-04', Horde_Date_Utils::firstDayOfWeek(1, 2010)->format('Y-m-d')); } }