Fixed error in C4::Dates causing unneeded warnings
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
- modifies opac-showreviews.pl to display recent comments for all
titles, sorted in descending order by date.
- includes RSS feed
- includes (thanks to Chris N.):
[Enhancement][3.4] Add RFC822 Format to C4::Dates
This patch adds RFC822 formatting to C4::Dates. It also updates Dates.t
appropriately. Consult the POD for this module for how to use
this format.
Please note that this module *does not* handle TZ conversion at this point.
This means that the TZ portion of a RFC822 time will be truncated and the converted
time will be in the same TZ as was passed in. When generating an RFC822 time,
the local TZ offset will be included since none of the other supported formats
provide a means for including their TZ. This is not a problem introduced by the
addition of RFC822 formatting. Rather it is due to this module not having TZ
support to begin with.
Also note that the dow, moy abbreviations are English as required by
RFC822 section 3.3 (thanks to self for pointing that out).
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
t/Dates.t is essentially restored from its previous state with
the revision that it now does not use C4::Context or check syspref
for the default date format. Instead it sets the C4::Dates default
directly, taking cue from command line argument or ENV. ISO format
revised to accept "T" separator and "Z" (zulu) terminator. POD
expanded and corrected.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This replaces using the package variable $prefformat directly, and
specifically, doing a call to C4::Context->preference() during
module initialization. That way, C4::Dates no longer has a
compile-time dependency on having a valid $dbh.
The inspiration for this is making it easier for
zebraqueue_daemon to have code that detects when
the database connection goes down and then try to
reconnect to the DB.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
When creating a new C4::Dates object, now carps
if the supplied date and/or time is semantically
invalid, i.e., 2007-01-32 will pass the regex
check but is not a valid date (there being no
32nd of January).
As the C4::Dates API is nailed down, these may
be converted to croaks in the future.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
There were 2 bugs :
- one in moremember.pl that supposed the date value to be in preffered order, which is wrong, it's in iso at this time
- the output does not work as expected, as it always return iso.
Pls atz, confirm Dates.pm was bugged.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Minor adjustments to Dates.pm and associated test. You should be able to run a
perl test that uses Context w/o getting fatalsToBrowser output.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Also included is a traditional perl (t/Dates.t) test script.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>