Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

git-svn-id: file:///opt/svn/scripts/misc/perl/cpan/Date-Holidays-DE/t…

…runk@74 484cc3a2-7d94-4784-8140-313c9a92d1de
  • Loading branch information...
commit 204bdd3310b1d20cebfdd563fd67c02cdefb22c9 1 parent 13a343c
martin authored
Showing with 13 additions and 10 deletions.
  1. +7 −0 Changes
  2. +5 −9 DE.pm
  3. +1 −1  example/feiertage.pl
View
7 Changes
@@ -8,3 +8,10 @@ v.0.6 Sun Nov 23 12:37:56 CET 2003
- Option to generate a list of all known holidays
- Added example scripts
+v.1.0 Sat May 3 13:28:27 CEST 2008
+ - %s in format string wasn't robust on some platforms. The availability check
+ was removed and everything dumbed down as kindly suggested by one user.
+ - Used the opportunity for making this a major release.
+
+v.1.0.1 Sat May 3 14:05:56 CEST 2008
+ - Fixed POD wording.
View
14 DE.pm
@@ -1,4 +1,5 @@
package Date::Holidays::DE;
+# $Id$
use strict;
use warnings;
@@ -14,7 +15,7 @@ require Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(holidays);
-our $VERSION = '0.6';
+our $VERSION = '1.0.1';
sub holidays{
my %parameters = (
@@ -275,12 +276,10 @@ sub holidays{
#
my @returnlist;
foreach(sort{$holidaylist{$a}<=>$holidaylist{$b}}(keys(%holidaylist))){
- # See if this platform has strftime(%s)
- # if not, inject seconds manually into format string.
+ # Not all platforms have strftime(%s).
+ # Therefore, inject seconds manually into format string.
my $formatstring = $parameters{'FORMAT'};
- if (strftime('%s', localtime($holidaylist{$_})) eq '%s'){
- $formatstring =~ s/%{0}%s/$holidaylist{$_}/g;
- }
+ $formatstring =~ s/%{0}%s/$holidaylist{$_}/g;
# Inject the holiday's alias name into the format string
# if it was requested by adding %#.
$formatstring =~ s/%{0}%#/$_/;
@@ -504,9 +503,6 @@ None of the calendar programs the author has looked at, know about June 17th.
B<Date::Holidays::DE> is not configurable. Holiday changes don't come over
night and a new module release can be rolled out within a single day.
-B<Date::Holidays::DE> probably won't work in Microsoft's "Windows" operating
-environment.
-
=head1 AUTHOR
Martin Schmitt E<lt>mas at scsy dot deE<gt>
View
2  example/feiertage.pl
@@ -38,7 +38,7 @@
# Get the list of holidays for next year
my @feiertage = @{holidays( WHERE => ['all'],
- FORMAT => "%#:%d.%m.%Y",
+ FORMAT => "%#:%d.%m.%Y (%s s since the epoch.)",
YEAR => $naechstes
)};
Please sign in to comment.
Something went wrong with that request. Please try again.