Calendar-List

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Calendar-List
==================================

1.02    2019-09-01
        - "Tidied up SEE ALSO section properly this time."
          PR #2 from Mohammad S Anwar
          https://github.com/barbie/calendar-list/pull/2
        - added Perl Advent example link.

1.01    2019-08-27
        - Tidy up pod
          PR #1 from Mohammad S Anwar
          https://github.com/barbie/calendar-list/pull/1

1.00    2019-08-26
        - fixes suggested by Kritika.io.
        - test improvements suggesed via coveralls.io.

0.28    2014-10-05
        - fixed maxcount setting when options and end date are both used.
          (RT#99247, thanks to Slaven Rezić).

0.27    2014-10-01

META.json  view on Meta::CPAN

    "license": [ "artistic_2" ],
    "dynamic_config" : 0,
    "release_status" : "stable",
    "meta-spec": {
        "version": "2",
        "url": "http://search.cpan.org/dist/CPAN-Meta/lib/CPAN/Meta/Spec.pm"
    },
    "generated_by": "The Hand of Barbie 1.0",
    "keywords" : [
        "date",
        "calendar"
    ],

    "prereqs" : {
        "runtime" : {
            "requires" : {
                "perl": "5.006",
                "Clone": "0",
                "Tie::IxHash": "0",
                "Time::Local": "0"
            },

META.json  view on Meta::CPAN

        }
    },
    "no_index": {
        "directory": ["t","examples"]
    },

    "resources": {
        "license": [ "http://www.perlfoundation.org/artistic_license_2_0" ],
        "bugtracker": { "web": "http://rt.cpan.org/Public/Dist/Display.html?Name=Calendar-List" },
        "repository": {
            "url": "git://github.com/barbie/calendar-list.git",
            "web": "http://github.com/barbie/calendar-list",
            "type": "git"
        }
    }
}

META.yml  view on Meta::CPAN

no_index:
  file:
    - t/TestData.pm
  directory:
    - t
    - examples

resources:
  license:    http://www.perlfoundation.org/artistic_license_2_0
  bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Calendar-List
  repository: http://github.com/barbie/calendar-list.git

meta-spec:
   version:   1.4
   url:       http://module-build.sourceforge.net/META-spec-v1.4.html
generated_by: The Hand of Barbie 1.0

README  view on Meta::CPAN

Calendar::List
==============

DESCRIPTION

This distribution consists of two modules, Calendar::List and
Calendar::Functions.

Calendar::List is intended to be used to return a simple list, hash or
scalar of calendar dates. This is achieved by the use of two functions,
calendar_list and calendar_selectbox. The former allows a return of a
list of dates and a hash of dates, whereas the later returns a scalar
containing a HTML code snippet for use as a HTML Form field select box.

Calendar::Functions is intended to provide numerous support functions
for other date and/or calendar functions, which are also used by
Calendar::List.

DEPENDENCIES

The distribution requires the following modules:

  Clone
  Tie::IxHash

The distribution requires at least one of the following modules:

lib/Calendar/Functions.pm  view on Meta::CPAN

use strict;
use warnings;

use vars qw($VERSION @ISA %EXPORT_TAGS @EXPORT @EXPORT_OK);
$VERSION = '1.02';

#----------------------------------------------------------------------------

=head1 NAME

Calendar::Functions - A module containing functions for dates and calendars.

=head1 SYNOPSIS

  use Calendar::Functions;
  $ext       = ext($day);
  $moty      = moty($monthname);
  $monthname = moty($moty);
  $dotw      = dotw($dayname);
  $dayname   = dotw($dotw);

lib/Calendar/Functions.pm  view on Meta::CPAN

  use Calendar::Functions qw(:form);
  $str = format_date( $fmt, $day, $month, $year, $dotw);
  $str = reformat_date( $date, $fmt1, $fmt2 );

  use Calendar::Functions qw(:all);
  fail_range($year);

=head1 DESCRIPTION

The module is intended to provide numerous support functions for other
date and/or calendar functions

=head1 EXPORT

  ext, moty, dotw

  dates:    encode_date, decode_date, compare_dates, add_day

  form:     format_date, reformat_date

  all:      encode_date, decode_date, compare_dates, add_day

lib/Calendar/Functions.pm  view on Meta::CPAN

=item L<Time::Piece>

=back

=head2 Further Information

=over 4

=item L<The Calendar FAQ>

L<http://www.tondering.dk/claus/calendar.html>

=item L<The Perl Advent Entry>

2018-12-01 : L<http://perladvent.org/2018/2018-12-01.html>

=back
  
=head1 BUGS, PATCHES & FIXES

There are no known bugs at the time of this release. However, if you spot a

lib/Calendar/List.pm  view on Meta::CPAN


=head1 NAME

Calendar::List - A module for creating date lists

=head1 SYNOPSIS

  use Calendar::List;

  # basic usage
  my %hash = calendar_list('DD-MM-YYYY' => 'DD MONTH, YYYY' );
  my @list = calendar_list('MM-DD-YYYY');
  my $html = calendar_selectbox('DD-MM-YYYY' => 'DAY DDEXT MONTH, YYYY');

  # using the hash
  my %hash01 = (
    'options'   => 10,
    'exclude'   => { 'weekend' => 1 },
    'start'     => '01-05-2003',
  );

  my %hash02 = (
    'options'   => 10,

lib/Calendar/List.pm  view on Meta::CPAN

  my %hash03 = (
    'exclude'   => { 'monday' => 1,
                     'tuesday' => 1,
                     'wednesday' => 1 },
    'start'     => '01-05-2003',
    'end'       => '10-05-2003',
    'name'      => 'MyDates',
    'selected'  => '04-05-2003',
  );

  my %hash = calendar_list('DD-MM-YYYY' => 'DDEXT MONTH YYYY', \%hash01);
  my @list = calendar_list('DD-MM-YYYY', \%hash02);
  my $html = calendar_selectbox('DD-MM-YYYY',\%hash03);

=head1 DESCRIPTION

The module is intended to be used to return a simple list, hash or scalar
of calendar dates. This is achieved by two functions, calendar_list and
calendar_selectbox. The former allows a return of a list of dates and a
hash of dates, whereas the later returns a scalar containing a HTML code
snippet for use as a HTML Form field select box.

=head1 EXPORT

  calendar_list,
  calendar_selectbox

=cut

#----------------------------------------------------------------------------

#############################################################################
#Export Settings                                                            #
#############################################################################

require Exporter;

@ISA = qw(Exporter);

%EXPORT_TAGS = ( 'all' => [ qw(
    calendar_list
    calendar_selectbox
) ] );

@EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
@EXPORT    = ( @{ $EXPORT_TAGS{'all'} } );

#############################################################################
#Library Modules                                                            #
#############################################################################

use Calendar::Functions qw(:all);

lib/Calendar/List.pm  view on Meta::CPAN

my (%months,%dotw);
for my $key (1..12) { $months{lc $months[$key]} = $key }
for my $key (0..6)  { $dotw{  lc $dotw[$key]  } = $key }

# THE DEFAULTS
my $Format      = 'DD-MM-YYYY';
my @order       = qw( day month year );

my %Defaults = (
    maxcount    => 30,
    selectname  => 'calendar',
    selected    => [],
    startdate   => undef,
    enddate     => undef,
    start       => [1,1,1970],
    end         => [31,12,2037],
    holidays    => {},
    exclude     => { 
        days        => [ 0,0,0,0,0,0,0 ],
        months      => [ 0,0,0,0,0,0,0,0,0,0,0,0,0 ],
    },

lib/Calendar/List.pm  view on Meta::CPAN

#----------------------------------------------------------------------------

#############################################################################
#Interface Functions                                                        #
#############################################################################

=head1 FUNCTIONS

=over 4

=item calendar_list([DATEFORMAT] [,DATEFORMAT] [,OPTIONSHASH])

Returns a list in an array context or a hash reference in any other context.
All paramters are optional, one or two date formats can be specified for the
date formats returned in the list/hash. A hash of user defined settings can
also be passed into the function. See below for further details.

Note that a second date format is not required when returning a list. A
single date format when returning a hash reference, will be used in both
key and value portions.

=cut

sub calendar_list {
    my $wantarray = (@_ < 2 || ref($_[1]) eq 'HASH') ? 1 : 0;
    my ($fmt1,$fmt2,$hash) = _thelist(@_);
    return _callist($fmt1,$fmt2,$hash,$wantarray);
}

=item calendar_selectbox([DATEFORMAT] [,DATEFORMAT] [,OPTIONSHASH])

Returns a scalar containing a HTML string. The HTML snippet consists of an
HTML form field select box. All paramters are optional, one or two date
formats can be specified for the date formats returned in the value
attribute and data portion. A hash of user defined settings can
also be passed into the function. See below for further details.

Note that a single date format will be used in both value attribute and
data portions.

=cut

sub calendar_selectbox {
    my ($fmt1,$fmt2,$hash) = _thelist(@_);
    return _calselect($fmt1,$fmt2,$hash);
}

#############################################################################
#Internal Functions                                                         #
#############################################################################

# name: _thelist
# args: format string 1 .... optional

lib/Calendar/List.pm  view on Meta::CPAN


=item options

The maximum number of items to be returned in the list.

Note that where 'options' and 'end' are both specified, 'options' takes 
precedence.

=item name

Used by calendar_selectbox. Names the select box form field.

=item select

Used by calendar_selectbox. Predefines the selected entry in a select box.

=item exclude

The exclude key allows the user to defined which days they wish to exclude
from the returned list. This can either consist of individual days or the
added flexibility of 'weekend' and 'weekday' to exclude a traditional
group of days. Full list is:

  weekday
  monday

lib/Calendar/List.pm  view on Meta::CPAN

=item L<Time::Piece>

=back

=head2 Further Information

=over 4

=item L<The Calendar FAQ>

L<http://www.tondering.dk/claus/calendar.html>

=item L<The Perl Advent Entry>

2018-12-01 : L<http://perladvent.org/2018/2018-12-01.html>

=back
  
=head1 BUGS, PATCHES & FIXES

There are no known bugs at the time of this release. However, if you spot a

t/21list-dt.t  view on Meta::CPAN

# check we can load the module
eval "use DateTime";
if($@) {
	plan skip_all => "DateTime not installed.";
}

plan tests => 15;

###########################################################################
# name: 21list-dt.t
# desc: Dates for calendar_list function using DateTime
###########################################################################

# -------------------------------------------------------------------------
# The tests

# 1. testing the returned array
foreach my $test (1..4,9,10,11,13,14,15) {
	my @args;
	push @args, $tests{$test}->{f1}		if $tests{$test}->{f1};
	push @args, $tests{$test}->{f2}		if $tests{$test}->{f2};
	push @args, $tests{$test}->{hash}	if $tests{$test}->{hash};

	my @array = calendar_list(@args);

	if($tests{$test}->{hash}) {
		is_deeply(\@array,$expected02{$test},".. matches $test index");
	} else {
		is(scalar(@array),scalar(@{$expected02{$test}}),".. matches $test count");
	}
}

# 2. testing the returned hash
foreach my $test (5..8,12) {
	my @args = ();
	push @args, $tests{$test}->{f1}		if $tests{$test}->{f1};
	push @args, $tests{$test}->{f2}		if $tests{$test}->{f2};
	push @args, $tests{$test}->{hash}	if $tests{$test}->{hash};

    my %hash = calendar_list(@args);

	if($tests{$test}->{hash}) {
		is_deeply(\%hash,$expected02{$test},".. matches $test index");
	} else {
		is(scalar(keys %hash),scalar(keys %{$expected02{$test}}),".. matches $test count");
	}
}

t/22list-di.t  view on Meta::CPAN

eval "use Date::ICal";
if($@) { plan skip_all => "Date::ICal not installed." }
plan tests => 15;

# switch off DateTime if loaded
use Calendar::Functions qw(:test);
_caltest(0,1);

###########################################################################
# name: 22list-di.t
# desc: Dates for calendar_list function using Date::ICal
###########################################################################

# -------------------------------------------------------------------------
# The tests

# 1. testing the returned array
foreach my $test (1..4,9,10,11,13,14,15) {
	my @args = ();
	push @args, $tests{$test}->{f1}		if $tests{$test}->{f1};
	push @args, $tests{$test}->{f2}		if $tests{$test}->{f2};
	push @args, $tests{$test}->{hash}	if $tests{$test}->{hash};

	my @array = calendar_list(@args);

	if($tests{$test}->{hash}) {
		is_deeply(\@array,$expected02{$test},".. matches $test index");
	} else {
		is(scalar(@array),scalar(@{$expected02{$test}}),".. matches $test count");
	}
}

# 2. testing the returned hash
foreach my $test (5..8,12) {
	my @args = ();
	push @args, $tests{$test}->{f1}		if $tests{$test}->{f1};
	push @args, $tests{$test}->{f2}		if $tests{$test}->{f2};
	push @args, $tests{$test}->{hash}	if $tests{$test}->{hash};
	
    my %hash = calendar_list(@args);

	if($tests{$test}->{hash}) {
		is_deeply(\%hash,$expected02{$test},".. matches $test index");
	} else {
		is(scalar(keys %hash),scalar(keys %{$expected02{$test}}),".. matches $test count");
	}
}

t/23list-tl.t  view on Meta::CPAN

use Test::More qw|no_plan|;
use TestData;
use Calendar::List;
use Calendar::Functions qw(:test);

# switch off DateTime and Date::ICal, if loaded
_caltest(0,0);

###########################################################################
# name: 23list-tl.t
# desc: Dates for calendar_list function using Time::Local
###########################################################################

# -------------------------------------------------------------------------
# The tests

my @tests = (1..4,9,10,14,15);
push @tests, 11,13	if($on_unix);

# 1. testing the returned array
foreach my $test (@tests) {
	my @args = ();
	push @args, $tests{$test}->{f1}		if $tests{$test}->{f1};
	push @args, $tests{$test}->{f2}		if $tests{$test}->{f2};
	push @args, $tests{$test}->{hash}	if $tests{$test}->{hash};

	my @array = calendar_list(@args);

	if($tests{$test}->{hash}) {
		is_deeply(\@array,$expected02{$test},".. matches $test index");
	} else {
		is(scalar(@array),scalar(@{$expected02{$test}}),".. matches $test count");
	}
}

@tests = (5..8);
push @tests, 12		if($on_unix);

# 2. testing the returned hash
foreach my $test (@tests) {
	my @args = ();
	push @args, $tests{$test}->{f1}		if $tests{$test}->{f1};
	push @args, $tests{$test}->{f2}		if $tests{$test}->{f2};
	push @args, $tests{$test}->{hash}	if $tests{$test}->{hash};
	
    my %hash = calendar_list(@args);

	if($tests{$test}->{hash}) {
		is_deeply(\%hash,$expected02{$test},".. matches $test index");
	} else {
		is(scalar(keys %hash),scalar(keys %{$expected02{$test}}),".. matches $test count");
	}
}

t/24list-holidays.t  view on Meta::CPAN

# -------------------------------------------------------------------------
# The tests

my @holidays = ('02-09-2005','04-09-2005','05-09-2005');
my @with     = ('01-09-2005','02-09-2005','03-09-2005','04-09-2005','05-09-2005','06-09-2005','07-09-2005');
my @without  = ('01-09-2005','03-09-2005','06-09-2005','07-09-2005');
my @weekdays = ('01-09-2005','06-09-2005','07-09-2005');
my @weekends = ('03-09-2005');

my %hash = (start => '01-09-2005',end=>'07-09-2005');
my @array = calendar_list(\%hash);
is_deeply(\@array,\@with);

$hash{exclude}->{holidays} = '04-09-2005';  # bad format, ignored
@array = calendar_list(\%hash);
is_deeply(\@array,\@with);

$hash{exclude}->{holidays} = \@holidays;
@array = calendar_list(\%hash);
is_deeply(\@array,\@without);

$hash{exclude}->{weekend} = 1;
@array = calendar_list(\%hash);
is_deeply(\@array,\@weekdays);

$hash{exclude}->{weekend} = 0;
$hash{exclude}->{weekday} = 1;
@array = calendar_list(\%hash);
is_deeply(\@array,\@weekends);

t/31select-dt.t  view on Meta::CPAN

# check we can load the module
eval "use DateTime";
if($@) {
	plan skip_all => "DateTime not installed.";
}

plan tests => 15;

###########################################################################
# name: 31select-dt.t
# desc: Dates for calendar_selectbox function
###########################################################################

# -------------------------------------------------------------------------
# The tests

# 1. testing the returned string
foreach my $test (1..15) {
	my @args = ();
	push @args, $tests{$test}->{f1}		if $tests{$test}->{f1};
	push @args, $tests{$test}->{f2}		if $tests{$test}->{f2};
	push @args, $tests{$test}->{hash}	if $tests{$test}->{hash};
	my $str = calendar_selectbox(@args);

	if($tests{$test}->{hash}) {
		is($str,$expected03{$test},".. matches $test index");
	} else {
		is(length $str,length $expected03{$test},".. matches $test count");
	}
}

t/32select-di.t  view on Meta::CPAN

eval "use Date::ICal";
if($@) { plan skip_all => "Date::ICal not installed." }
plan tests => 15;

# switch off DateTime if loaded
use Calendar::Functions qw(:test);
_caltest(0,1);

###########################################################################
# name: 32select-di.t
# desc: Dates for calendar_selectbox function
###########################################################################

# -------------------------------------------------------------------------
# The tests

# 1. testing the returned string
foreach my $test (1..15) {
	my @args = ();
	push @args, $tests{$test}->{f1}		if $tests{$test}->{f1};
	push @args, $tests{$test}->{f2}		if $tests{$test}->{f2};
	push @args, $tests{$test}->{hash}	if $tests{$test}->{hash};
	my $str = calendar_selectbox(@args);

	if($tests{$test}->{hash}) {
		is($str,$expected03{$test},".. matches $test index");
	} else {
		is(length $str,length $expected03{$test},".. matches $test count");
	}
}

t/33select-tl.t  view on Meta::CPAN

use Test::More qw|no_plan|;
use TestData;
use Calendar::List;
use Calendar::Functions qw(:test);

# switch off DateTime and Date::ICal, if loaded
_caltest(0,0);

###########################################################################
# name: 33select-tl.t
# desc: Dates for calendar_selectbox function
###########################################################################

# -------------------------------------------------------------------------
# The tests

my @tests = (1..10,14,15);
push @tests, 11,12,13	if($on_unix);

# 1. testing the returned string
foreach my $test (@tests) {
	my @args = ();
	push @args, $tests{$test}->{f1}		if $tests{$test}->{f1};
	push @args, $tests{$test}->{f2}		if $tests{$test}->{f2};
	push @args, $tests{$test}->{hash}	if $tests{$test}->{hash};
	my $str = calendar_selectbox(@args);

	if($tests{$test}->{hash}) {
		is($str,$expected03{$test},".. matches $test index");
	} else {
		my @array1 = split(/\n/,$str);
		my @array2 = split(/\n/,$expected03{$test});
#		is_deeply(\@array1,\@array2);
		is(scalar(@array1),scalar(@array2),".. matches $test count");
#		is(length $str,length $expected03{$test});
	}

t/TestData.pm  view on Meta::CPAN

        '2015-01-07' => '07-01-2015',
        ],
15 => [
        '2014-11-30' => '30-11-2014',
        '2015-01-01' => '01-01-2015',
        ],
);

%expected03 = (
1 =>
q|<select name='calendar'>
<option value='2003-05-24'>2003-05-24</option>
<option value='2003-05-25'>2003-05-25</option>
<option value='2003-05-26'>2003-05-26</option>
<option value='2003-05-27'>2003-05-27</option>
<option value='2003-05-28'>2003-05-28</option>
<option value='2003-05-29'>2003-05-29</option>
<option value='2003-05-30'>2003-05-30</option>
<option value='2003-05-31'>2003-05-31</option>
<option value='2003-06-01'>2003-06-01</option>
<option value='2003-06-02'>2003-06-02</option>

t/TestData.pm  view on Meta::CPAN

<option value='2003-06-16'>2003-06-16</option>
<option value='2003-06-17'>2003-06-17</option>
<option value='2003-06-18'>2003-06-18</option>
<option value='2003-06-19'>2003-06-19</option>
<option value='2003-06-20'>2003-06-20</option>
<option value='2003-06-21'>2003-06-21</option>
<option value='2003-06-22'>2003-06-22</option>
</select>
|,
2 =>
q|<select name='calendar'>
<option value='01-05-2003'>01-05-2003</option>
<option value='02-05-2003'>02-05-2003</option>
<option value='05-05-2003'>05-05-2003</option>
<option value='06-05-2003'>06-05-2003</option>
<option value='07-05-2003'>07-05-2003</option>
<option value='08-05-2003'>08-05-2003</option>
<option value='09-05-2003'>09-05-2003</option>
<option value='12-05-2003'>12-05-2003</option>
<option value='13-05-2003'>13-05-2003</option>
<option value='14-05-2003'>14-05-2003</option>
</select>
|,
3 =>
q|<select name='TestTest'>
<option value='05-03-2003'>05-03-2003</option>
<option value='05-04-2003' selected="selected">05-04-2003</option>
<option value='05-10-2003'>05-10-2003</option>
</select>
|,
4 =>
q|<select name='calendar'>
<option value='01-May-2003'>01-May-2003</option>
<option value='02-May-2003'>02-May-2003</option>
<option value='03-May-2003'>03-May-2003</option>
<option value='04-May-2003'>04-May-2003</option>
<option value='08-May-2003'>08-May-2003</option>
<option value='09-May-2003'>09-May-2003</option>
<option value='10-May-2003'>10-May-2003</option>
<option value='11-May-2003'>11-May-2003</option>
<option value='15-May-2003'>15-May-2003</option>
<option value='16-May-2003'>16-May-2003</option>
</select>
|,
5 =>
q|<select name='calendar'>
<option value='2003-05-24'>24-05-2003</option>
<option value='2003-05-25'>25-05-2003</option>
<option value='2003-05-26'>26-05-2003</option>
<option value='2003-05-27'>27-05-2003</option>
<option value='2003-05-28'>28-05-2003</option>
<option value='2003-05-29'>29-05-2003</option>
<option value='2003-05-30'>30-05-2003</option>
<option value='2003-05-31'>31-05-2003</option>
<option value='2003-06-01'>01-06-2003</option>
<option value='2003-06-02'>02-06-2003</option>

t/TestData.pm  view on Meta::CPAN

<option value='2003-06-16'>16-06-2003</option>
<option value='2003-06-17'>17-06-2003</option>
<option value='2003-06-18'>18-06-2003</option>
<option value='2003-06-19'>19-06-2003</option>
<option value='2003-06-20'>20-06-2003</option>
<option value='2003-06-21'>21-06-2003</option>
<option value='2003-06-22'>22-06-2003</option>
</select>
|,
6 =>
q|<select name='calendar'>
<option value='01-05-2003'>2003-05-01</option>
<option value='02-05-2003'>2003-05-02</option>
<option value='05-05-2003'>2003-05-05</option>
<option value='06-05-2003'>2003-05-06</option>
<option value='07-05-2003'>2003-05-07</option>
<option value='08-05-2003'>2003-05-08</option>
<option value='09-05-2003'>2003-05-09</option>
<option value='12-05-2003'>2003-05-12</option>
<option value='13-05-2003'>2003-05-13</option>
<option value='14-05-2003'>2003-05-14</option>
</select>
|,
7 =>
q|<select name='TestTest'>
<option value='05-03-2003'>03 May, 2003</option>
<option value='05-04-2003' selected="selected">04 May, 2003</option>
<option value='05-10-2003'>10 May, 2003</option>
</select>
|,
8 =>
q|<select name='calendar'>
<option value='01-May-2003'>Thursday 1st May, 2003</option>
<option value='02-May-2003'>Friday 2nd May, 2003</option>
<option value='03-May-2003'>Saturday 3rd May, 2003</option>
<option value='04-May-2003'>Sunday 4th May, 2003</option>
<option value='08-May-2003'>Thursday 8th May, 2003</option>
<option value='09-May-2003'>Friday 9th May, 2003</option>
<option value='10-May-2003'>Saturday 10th May, 2003</option>
<option value='11-May-2003'>Sunday 11th May, 2003</option>
<option value='15-May-2003'>Thursday 15th May, 2003</option>
<option value='16-May-2003'>Friday 16th May, 2003</option>
</select>
|,
9 =>
q|<select name='calendar'>
<option value='24-05-2003'>24-05-2003</option>
<option value='25-05-2003'>25-05-2003</option>
<option value='26-05-2003'>26-05-2003</option>
<option value='27-05-2003'>27-05-2003</option>
<option value='28-05-2003'>28-05-2003</option>
<option value='29-05-2003'>29-05-2003</option>
<option value='30-05-2003'>30-05-2003</option>
<option value='31-05-2003'>31-05-2003</option>
<option value='01-06-2003'>01-06-2003</option>
<option value='02-06-2003'>02-06-2003</option>

t/TestData.pm  view on Meta::CPAN

<option value='16-06-2003'>16-06-2003</option>
<option value='17-06-2003'>17-06-2003</option>
<option value='18-06-2003'>18-06-2003</option>
<option value='19-06-2003'>19-06-2003</option>
<option value='20-06-2003'>20-06-2003</option>
<option value='21-06-2003'>21-06-2003</option>
<option value='22-06-2003'>22-06-2003</option>
</select>
|,
10 =>
q|<select name='calendar'>
<option value='01-05-2003'>01-05-2003</option>
<option value='02-05-2003'>02-05-2003</option>
<option value='03-05-2003'>03-05-2003</option>
<option value='04-05-2003'>04-05-2003</option>
<option value='08-05-2003'>08-05-2003</option>
<option value='09-05-2003'>09-05-2003</option>
<option value='10-05-2003'>10-05-2003</option>
<option value='11-05-2003'>11-05-2003</option>
<option value='15-05-2003'>15-05-2003</option>
<option value='16-05-2003'>16-05-2003</option>



( run in 2.177 seconds using v1.01-cache-2.11-cpan-c333fce770f )