Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 3 changed files with 13 additions and 10 deletions. Show diff stats Hide diff stats

  1. +7 0 Changes
  2. +5 9 DE.pm
  3. +1 1  example/feiertage.pl
7 Changes
@@ -8,3 +8,10 @@ v.0.6 Sun Nov 23 12:37:56 CET 2003
8 8 - Option to generate a list of all known holidays
9 9 - Added example scripts
10 10
  11 +v.1.0 Sat May 3 13:28:27 CEST 2008
  12 + - %s in format string wasn't robust on some platforms. The availability check
  13 + was removed and everything dumbed down as kindly suggested by one user.
  14 + - Used the opportunity for making this a major release.
  15 +
  16 +v.1.0.1 Sat May 3 14:05:56 CEST 2008
  17 + - Fixed POD wording.
14 DE.pm
... ... @@ -1,4 +1,5 @@
1 1 package Date::Holidays::DE;
  2 +# $Id$
2 3
3 4 use strict;
4 5 use warnings;
@@ -14,7 +15,7 @@ require Exporter;
14 15
15 16 our @ISA = qw(Exporter);
16 17 our @EXPORT_OK = qw(holidays);
17   -our $VERSION = '0.6';
  18 +our $VERSION = '1.0.1';
18 19
19 20 sub holidays{
20 21 my %parameters = (
@@ -275,12 +276,10 @@ sub holidays{
275 276 #
276 277 my @returnlist;
277 278 foreach(sort{$holidaylist{$a}<=>$holidaylist{$b}}(keys(%holidaylist))){
278   - # See if this platform has strftime(%s)
279   - # if not, inject seconds manually into format string.
  279 + # Not all platforms have strftime(%s).
  280 + # Therefore, inject seconds manually into format string.
280 281 my $formatstring = $parameters{'FORMAT'};
281   - if (strftime('%s', localtime($holidaylist{$_})) eq '%s'){
282   - $formatstring =~ s/%{0}%s/$holidaylist{$_}/g;
283   - }
  282 + $formatstring =~ s/%{0}%s/$holidaylist{$_}/g;
284 283 # Inject the holiday's alias name into the format string
285 284 # if it was requested by adding %#.
286 285 $formatstring =~ s/%{0}%#/$_/;
@@ -504,9 +503,6 @@ None of the calendar programs the author has looked at, know about June 17th.
504 503 B<Date::Holidays::DE> is not configurable. Holiday changes don't come over
505 504 night and a new module release can be rolled out within a single day.
506 505
507   -B<Date::Holidays::DE> probably won't work in Microsoft's "Windows" operating
508   -environment.
509   -
510 506 =head1 AUTHOR
511 507
512 508 Martin Schmitt E<lt>mas at scsy dot deE<gt>
2  example/feiertage.pl
@@ -38,7 +38,7 @@
38 38
39 39 # Get the list of holidays for next year
40 40 my @feiertage = @{holidays( WHERE => ['all'],
41   - FORMAT => "%#:%d.%m.%Y",
  41 + FORMAT => "%#:%d.%m.%Y (%s s since the epoch.)",
42 42 YEAR => $naechstes
43 43 )};
44 44

0 comments on commit 204bdd3

Please sign in to comment.
Something went wrong with that request. Please try again.