Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / man / man3 / Date::Calendar::Profiles.3
CommitLineData
86530b38
AT
1.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
55.if \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1
76. ds #] \fP
77.\}
78.if t \{\
79. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80. ds #V .6m
81. ds #F 0
82. ds #[ \&
83. ds #] \&
84.\}
85. \" simple accents for nroff and troff
86.if n \{\
87. ds ' \&
88. ds ` \&
89. ds ^ \&
90. ds , \&
91. ds ~ ~
92. ds /
93.\}
94.if t \{\
95. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101.\}
102. \" troff and (daisy-wheel) nroff accents
103.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110.ds ae a\h'-(\w'a'u*4/10)'e
111.ds Ae A\h'-(\w'A'u*4/10)'E
112. \" corrections for vroff
113.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115. \" for low resolution devices (crt and lpr)
116.if \n(.H>23 .if \n(.V>19 \
117\{\
118. ds : e
119. ds 8 ss
120. ds o a
121. ds d- d\h'-1'\(ga
122. ds D- D\h'-1'\(hy
123. ds th \o'bp'
124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "PROFILES 1"
132.TH PROFILES 1 "2002-09-28" "perl v5.8.0" "User Contributed Perl Documentation"
133.SH "NAME"
134Date::Calendar::Profiles \- Some sample profiles for Date::Calendar
135and Date::Calendar::Year
136.SH "SYNOPSIS"
137.IX Header "SYNOPSIS"
138.Vb 2
139\& use Date::Calendar::Profiles qw( $Profiles );
140\& use Date::Calendar;
141.Ve
142.PP
143.Vb 2
144\& $cal_US_AK = Date::Calendar->new( $Profiles->{'US-AK'} [,LANG] );
145\& $cal_DE_BY = Date::Calendar->new( $Profiles->{'DE-BY'} [,LANG] );
146.Ve
147.PP
148.Vb 1
149\& or
150.Ve
151.PP
152.Vb 2
153\& use Date::Calendar::Profiles qw( $Profiles );
154\& use Date::Calendar::Year;
155.Ve
156.PP
157.Vb 2
158\& $year_2000_US_FL = Date::Calendar::Year->new( 2000, $Profiles->{'US-FL'} [,LANG] );
159\& $year_2001_DE_NW = Date::Calendar::Year->new( 2001, $Profiles->{'DE-NW'} [,LANG] );
160.Ve
161.PP
162.Vb 1
163\& and also
164.Ve
165.PP
166.Vb 13
167\& use Date::Calendar::Profiles
168\& qw(
169\& &Previous_Friday
170\& &Next_Monday
171\& &Next_Monday_or_Tuesday
172\& &Nearest_Workday
173\& &Sunday_to_Monday
174\& &Advent1
175\& &Advent2
176\& &Advent3
177\& &Advent4
178\& &Advent
179\& );
180.Ve
181.SH "PREFACE"
182.IX Header "PREFACE"
183This module provides some sample profiles (i.e., holiday schemes)
184for use with the \fIDate::Calendar\fR\|(3) and \fIDate::Calendar::Year\fR\|(3)
185module.
186.PP
187You are not required to use these, you can always roll your own
188(this is very easy). See the section \*(L"\s-1HOW\s0 \s-1TO\s0 \s-1ROLL\s0 \s-1YOUR\s0 \s-1OWN\s0\*(R" below
189for more instructions on how to do this, and take the profiles
190from this module as examples.
191.PP
192Please let me know of any errors in these profiles, and please
193send me your own profiles if you'd like to see them included in
194the next release of this module! Thank you!
195.PP
196(But please, only use the ISO\-Latin\-1 character set whenever
197possible, since my module doesn't support any other character
198sets yet, or at least tell me which character set you used
199so I can document this in this manual page. Thank you!)
200.SH "DESCRIPTION"
201.IX Header "DESCRIPTION"
202The method \*(L"\fIinit()\fR\*(R" in module \fIDate::Calendar::Year\fR\|(3) is
203responsible for parsing the calendar schemes contained
204here in the Date::Calendar::Profiles module.
205.PP
206This method offers a \*(L"mini\-language\*(R" which allows to
207specify common date formulas, like for instance a simple
208fixed date (in various different formats, e.g. american
209or european), or things like \*(L"the second Sunday of May\*(R"
210(Mother's Day), or \*(L"Easter Sunday minus 46 days\*(R" (Ash
211Wednesday), to cite just a few.
212.PP
213See the section \*(L"\s-1DATE\s0 \s-1FORMULA\s0 \s-1SYNTAX\s0\*(R" below for more
214details.
215.PP
216There are some more complicated formulas, however, which
217cannot be expressed in such simple terms.
218.PP
219The rule that if a holiday falls on a weekend, it will
220be substituted by either the adjacent Friday or Monday
221(whichever lies closer), is an example of this.
222.PP
223In order to be able to deal with such formulas, and in
224order to be as flexible as possible, the \*(L"\fIinit()\fR\*(R" method
225offers the possibility of using callback functions to
226deal with such dates and formulas.
227.PP
228See the section \*(L"\s-1CALLBACK\s0 \s-1INTERFACE\s0\*(R" below for more
229details on this topic.
230.PP
231In order to assist you with more common cases of odd
232formulas, the module Date::Calendar::Profiles exports
233the following utility subroutines (which are meant to
234be used as \*(L"filters\*(R" in callback functions of your own):
235.IP "\(bu" 2
236\&\f(CW\*(C`($year,$month,$day[,ANYTHING]) = Previous_Friday($year,$month,$day[,ANYTHING]);\*(C'\fR
237.Sp
238If the given date falls on a Saturday or Sunday, this
239function changes the date to the adjacent Friday before
240that, and returns this new date.
241.Sp
242Otherwise the given date is returned unchanged.
243.Sp
244The rest of the input parameters, if any, are simply
245copied to the output.
246.IP "\(bu" 2
247\&\f(CW\*(C`($year,$month,$day[,ANYTHING]) = Next_Monday($year,$month,$day[,ANYTHING]);\*(C'\fR
248.Sp
249If the given date falls on a Saturday or Sunday, this
250function changes the date to the adjacent Monday after
251that, and returns this new date.
252.Sp
253Otherwise the given date is returned unchanged.
254.Sp
255The rest of the input parameters, if any, are simply
256copied to the output.
257.IP "\(bu" 2
258\&\f(CW\*(C`($year,$month,$day[,ANYTHING]) = Next_Monday_or_Tuesday($year,$month,$day[,ANYTHING]);\*(C'\fR
259.Sp
260If the given date falls on a Saturday, the date of the next
261Monday (after that weekend) is returned.
262.Sp
263If the given date falls on a Sunday, the date of the next
264Tuesday (after that weekend) is returned.
265.Sp
266If the given date falls on a Monday, the date of the next
267Tuesday (the day after the Monday) is returned.
268.Sp
269Otherwise the given date is returned unchanged.
270.Sp
271The rest of the input parameters, if any, are simply
272copied to the output.
273.Sp
274This function is used for the second of two adjacent
275holidays, where the first holiday obeys the \*(L"Next
276Monday\*(R" rule (see the description of the function
277immediately above).
278.Sp
279Examples of this are Christmas and Boxing Day, among
280others.
281.Sp
282When the first holiday falls on Friday, the second one
283falls on Saturday and is substituted by Monday.
284.Sp
285When the first holiday falls on a Saturday, the second
286one falls on Sunday, so the first holiday is substituted
287by Monday and the second one by Tuesday.
288.Sp
289When the first holiday falls on a Sunday, the second
290one falls on a Monday. Therefore the first holiday is
291substituted by Monday, and consequently the second
292holiday must be substituted by Tuesday.
293.Sp
294Or, in other terms:
295.Sp
296.Vb 3
297\& Fri Sat => Fri Mon
298\& Sat Sun => Mon Tue
299\& Sun Mon => Mon Tue
300.Ve
301.Sp
302Note that there is no filter subroutine yet for the
303second of two adjacent holidays when the first holiday
304obeys the \*(L"Nearest Workday\*(R" rule (see the function
305described immediately below), i.e.,
306.Sp
307.Vb 3
308\& Fri Sat => Fri Mon
309\& Sat Sun => Fri Mon
310\& Sun Mon => Mon Tue
311.Ve
312.Sp
313This is left as an excercise to the inclined reader. \f(CW\*(C`:\-)\*(C'\fR
314.IP "\(bu" 2
315\&\f(CW\*(C`($year,$month,$day[,ANYTHING]) = Nearest_Workday($year,$month,$day[,ANYTHING]);\*(C'\fR
316.Sp
317If the given date falls on a Saturday, this function
318returns the date of the Friday on the day before.
319.Sp
320If the given date falls on a Sunday, this function
321returns the date of the Monday on the day after.
322.Sp
323Otherwise the given date is returned unchanged.
324.Sp
325The rest of the input parameters, if any, are simply
326copied to the output.
327.IP "\(bu" 2
328\&\f(CW\*(C`($year,$month,$day[,ANYTHING]) = Sunday_to_Monday($year,$month,$day[,ANYTHING]);\*(C'\fR
329.Sp
330If the given date falls on a Sunday, this function
331returns the date of the Monday on the day after.
332.Sp
333Otherwise the given date is returned unchanged.
334.Sp
335The rest of the input parameters, if any, are simply
336copied to the output.
337.PP
338The typical use of these filter subroutines is in a \*(L"return\*(R"
339statement at the end of callback functions of your own, when
340you already have calculated the holiday in question and only
341need to adjust it according to the rule implemented by the
342filter subroutine in question.
343.PP
344See also the implementation of the Date::Calendar::Profiles
345module for examples of how to use these functions.
346.SH "DATE FORMULA SYNTAX"
347.IX Header "DATE FORMULA SYNTAX"
348.Vb 1
349\& - Fixed dates:
350.Ve
351.PP
352.Vb 2
353\& "Christmas" => "24.12", # European format (day, month)
354\& "Christmas" => "24.12.",
355.Ve
356.PP
357.Vb 4
358\& "Christmas" => "24Dec",
359\& "Christmas" => "24.Dec",
360\& "Christmas" => "24Dec.",
361\& "Christmas" => "24.Dec.",
362.Ve
363.PP
364.Vb 2
365\& "Christmas" => "24-12",
366\& "Christmas" => "24-12-",
367.Ve
368.PP
369.Vb 2
370\& "Christmas" => "24-Dec",
371\& "Christmas" => "24-Dec-",
372.Ve
373.PP
374.Vb 3
375\& "Christmas" => "12/25", # American format (month, day)
376\& "Christmas" => "Dec25",
377\& "Christmas" => "Dec/25",
378.Ve
379.PP
380.Vb 1
381\& - Dates relative to Easter Sunday:
382.Ve
383.PP
384.Vb 13
385\& "Ladies' Carnival" => "-52",
386\& "Carnival Monday" => "-48",
387\& "Mardi Gras" => "-47",
388\& "Ash Wednesday" => "-46",
389\& "Palm Sunday" => "-7",
390\& "Maundy Thursday" => "-3",
391\& "Good Friday" => "-2",
392\& "Easter Sunday" => "+0",
393\& "Easter Monday" => "+1",
394\& "Ascension" => "+39",
395\& "Whitsunday" => "+49",
396\& "Whitmonday" => "+50",
397\& "Corpus Christi" => "+60",
398.Ve
399.PP
400.Vb 1
401\& - The 1st, 2nd, 3rd, 4th or last day of week:
402.Ve
403.PP
404.Vb 7
405\& "Thanksgiving" => "4Thu11",
406\& "Thanksgiving" => "4/Thu/Nov",
407\& "Columbus Day" => "2/Mon/Oct",
408\& "Columbus Day" => "2/Mon/10",
409\& "Columbus Day" => "2/1/Oct",
410\& "Columbus Day" => "2/1/10",
411\& "Memorial Day" => "5/Mon/May", # LAST Monday of May
412.Ve
413.PP
414.Vb 1
415\& - Half holidays, commemorative days:
416.Ve
417.PP
418.Vb 2
419\& "Christmas" => ":24.12.", # only half a day off
420\& "Valentine's Day" => "#Feb/14", # not an official holiday
421.Ve
422.SH "CALLBACK INTERFACE"
423.IX Header "CALLBACK INTERFACE"
424The interface of the callback functions to use with the
425\&\*(L"\fIinit()\fR\*(R" method of the \fIDate::Calendar::Year\fR\|(3) module is
426very simple:
427.PP
428The callback function receives two arguments when called,
429first the year number for which the holiday is to be
430calculated, and second the name (the \*(L"label\*(R") of the
431holiday in question (which serves as key in the hash
432of a holiday scheme).
433.PP
434This second parameter allows you to use the same callback
435function for different holidays, which might be more practical
436(than separate callback functions) if for instance you have
437a set of similar holidays to calculate, like for instance
438the four Sundays before Christmas (\*(L"Advent\*(R").
439.PP
440The callback function \*(L"\fIAdvent()\fR\*(R" (exported by the
441Date::Calendar::Profiles module) exemplifies this
442technique.
443.PP
444The callback function is expected to return a list
445"\f(CW\*(C`($year,$month,$day)\*(C'\fR" with the exact date of the
446holiday (the year number in the output must of course
447match the year number passed as parameter).
448.PP
449A fatal error occurs if the returned list does not
450constitute a valid date, in the requested year.
451.PP
452Optionally, the callback function may return a fourth
453value (after the date) containing a string, which may
454be either \*(L"#\*(R" or \*(L":\*(R".
455.PP
456The string \*(L"#\*(R" signifies that the date in question is
457a purely commemorative date, i.e., that you don't get
458a day off from work on that day.
459.PP
460The string \*(L":\*(R" means that the date in question is a
461\&\*(L"half\*(R" holiday, i.e., a day on which you get half a
462day off from work.
463.PP
464In case the holiday in question was not observed or did
465not exist in the requested year, the callback function
466may also return an empty list. This will cause the \*(L"\fIinit()\fR\*(R"
467method to simply drop this holiday for that year.
468.PP
469The module Date::Calendar::Profiles exports the sample
470callback functions \*(L"\fIAdvent1()\fR\*(R", \*(L"\fIAdvent2()\fR\*(R", \*(L"\fIAdvent3()\fR\*(R",
471\&\*(L"\fIAdvent4()\fR\*(R" and \*(L"\fIAdvent()\fR\*(R", which might assist you in
472rolling your own profiles.
473.SH "HOW TO ROLL YOUR OWN"
474.IX Header "HOW TO ROLL YOUR OWN"
475Every calendar profile (holiday scheme) is a hash.
476.PP
477The name of the holiday (like \*(L"Christmas\*(R", for instance)
478serves as the key in this hash and must therefore be
479unique (unless you want to override a default which was
480set previously, but see below for more on this).
481.PP
482The value for each key is either a string, which specifies
483a simple date formula, or the reference of a callback function.
484.PP
485See the section \*(L"\s-1CALLBACK\s0 \s-1INTERFACE\s0\*(R" above for a description
486of the interface (in and out) of these callback functions.
487.PP
488See the section \*(L"\s-1DATE\s0 \s-1FORMULA\s0 \s-1SYNTAX\s0\*(R" above and the description
489of the \*(L"\fIinit()\fR\*(R" method in \fIDate::Calendar::Year\fR\|(3) for the
490exact syntax of date formula strings.
491.PP
492\&\fB\s-1BEWARE\s0\fR that if keys are not unique in the source code,
493later entries will overwrite previous ones! I.e.,
494.PP
495.Vb 4
496\& ...
497\& "My special holiday" => "01-11",
498\& "My special holiday" => "02-11",
499\& ...
500.Ve
501.PP
502will \fB\s-1NOT\s0\fR set two holidays of the same name, one on November
503first, the other on November second, but only one, on November
504second!
505.PP
506Therefore, in order to use sets of defaults and to be able
507to override some of them, you must \fB\s-1FIRST\s0\fR include any hash
508containing the default definitions, and \fB\s-1THEN\s0\fR write down
509your own definitions (see also the Date::Calendar::Profiles
510module for examples of this!), like this:
511.PP
512.Vb 6
513\& $defaults =
514\& {
515\& "Holiday #1" => "01-01",
516\& "Holiday #2" => "02-02",
517\& "Holiday #3" => "03-03"
518\& };
519.Ve
520.PP
521.Vb 6
522\& $variant1 =
523\& {
524\& %$defaults,
525\& "Holiday #2" => "09-02",
526\& "Holiday #4" => "04-04"
527\& };
528.Ve
529.PP
530This is because of the way hashes work in Perl.
531.PP
532Now let's suppose that you want to write a profile containing
533all your relatives' and friends' birthdays or anniversaries.
534.PP
535Simply go ahead and list them in your program, in any order
536you like, as follows (for example):
537.PP
538.Vb 16
539\& $Birthdays =
540\& {
541\& "Spouse 1971" => "30.12.",
542\& "Wedding Day 1992" => "01.09.",
543\& "Valentine's Day" => "14.02.",
544\& "Son Richard 1996" => "11.05.",
545\& "Daughter Irene 1994" => "17.01.",
546\& "Mom 1939" => "19.08.",
547\& "Dad 1937" => "23.04.",
548\& "Brother Timothy 1969" => "24.04.",
549\& "Sister Catherine 1973" => "21.10.",
550\& "Cousin Paul 1970" => "16.10.",
551\& "Aunt Marjorie 1944" => "09.06.",
552\& "Uncle George 1941" => "02.08.",
553\& "Friend Alexander 1968" => "12.06.",
554\& };
555.Ve
556.PP
557The year numbers after the names are not really necessary,
558but they allow us to display the person's current age. If
559this year number is omitted, we simply don't display the age.
560.PP
561Now in order to query this birthday database, we can use the
562following little program:
563.PP
564.Vb 1
565\& #!perl -w
566.Ve
567.PP
568.Vb 4
569\& use strict;
570\& no strict "vars";
571\& use Date::Calc qw(:all);
572\& use Date::Calendar;
573.Ve
574.PP
575.Vb 4
576\& $Birthdays =
577\& {
578\& ... # (see above)
579\& };
580.Ve
581.PP
582.Vb 3
583\& @today = Today();
584\& $calendar = Date::Calendar->new( $Birthdays );
585\& $calendar->year( $today[0] );
586.Ve
587.PP
588.Vb 41
589\& foreach $key (@ARGV)
590\& {
591\& if (@list = $calendar->search( $key ))
592\& {
593\& foreach $date (@list)
594\& {
595\& @labels = $calendar->labels( $date );
596\& $dow = shift(@labels);
597\& # More than one person might have birthday on the same date:
598\& $name = $key;
599\& foreach $person (@labels)
600\& {
601\& if (index(lc($person),lc($key)) >= 0)
602\& {
603\& $name = $person;
604\& last;
605\& }
606\& }
607\& $delta = Delta_Days(@today, $date->date());
608\& $age = '';
609\& if ($name =~ s!\es*(\ed+)\es*$!!)
610\& {
611\& $age = $today[0] - $1;
612\& $age-- if ($delta > 0);
613\& $age = sprintf(" (%2d years old)", $age);
614\& }
615\& printf
616\& (
617\& "%-20.20s: %+5d days => %3.3s %2d-%3.3s-%4d%s\en",
618\& $name,
619\& $delta,
620\& $dow,
621\& $date->day(),
622\& Month_to_Text($date->month()),
623\& $date->year(),
624\& $age
625\& );
626\& }
627\& }
628\& else { print "No entry found in birthday list for '$key'!\en" }
629\& }
630.Ve
631.PP
632.Vb 1
633\& __END__
634.Ve
635.PP
636Let us save this program as, say, \*(L"birthday.pl\*(R".
637.PP
638Then we can query this birthday database by providing search strings
639on the command line, like this (note that this is a (case\-insensitive)
640substring search, \fB\s-1NOT\s0\fR a regular expression match!):
641.PP
642.Vb 2
643\& > date
644\& Wed Oct 3 18:05:45 CEST 2001
645.Ve
646.PP
647.Vb 3
648\& > perl birthday.pl wed spo
649\& Wedding Day : -32 days => Sat 1-Sep-2001 ( 9 years old)
650\& Spouse : +88 days => Sun 30-Dec-2001 (29 years old)
651.Ve
652.PP
653.Vb 3
654\& > perl birthday.pl son daug
655\& Son Richard : -145 days => Fri 11-May-2001 ( 5 years old)
656\& Daughter Irene : -259 days => Wed 17-Jan-2001 ( 7 years old)
657.Ve
658.PP
659.Vb 3
660\& > perl birthday.pl broth sist
661\& Brother Timothy : -162 days => Tue 24-Apr-2001 (32 years old)
662\& Sister Catherine : +18 days => Sun 21-Oct-2001 (27 years old)
663.Ve
664.PP
665.Vb 3
666\& > perl birthday.pl mom dad
667\& Mom : -45 days => Sun 19-Aug-2001 (62 years old)
668\& Dad : -163 days => Mon 23-Apr-2001 (64 years old)
669.Ve
670.PP
671.Vb 3
672\& > perl birthday.pl uncl aunt
673\& Uncle George : -62 days => Thu 2-Aug-2001 (60 years old)
674\& Aunt Marjorie : -116 days => Sat 9-Jun-2001 (57 years old)
675.Ve
676.PP
677.Vb 2
678\& > perl birthday.pl alex
679\& Friend Alexander : -113 days => Tue 12-Jun-2001 (33 years old)
680.Ve
681.PP
682In order to get the whole list, we can supply a substring which is
683contained in every name, which happens to be a blank (\f(CW"\ "\fR):
684.PP
685.Vb 14
686\& > perl birthday.pl ' '
687\& Daughter Irene : -259 days => Wed 17-Jan-2001 ( 7 years old)
688\& Valentine's Day : -231 days => Wed 14-Feb-2001
689\& Dad : -163 days => Mon 23-Apr-2001 (64 years old)
690\& Brother Timothy : -162 days => Tue 24-Apr-2001 (32 years old)
691\& Son Richard : -145 days => Fri 11-May-2001 ( 5 years old)
692\& Aunt Marjorie : -116 days => Sat 9-Jun-2001 (57 years old)
693\& Friend Alexander : -113 days => Tue 12-Jun-2001 (33 years old)
694\& Uncle George : -62 days => Thu 2-Aug-2001 (60 years old)
695\& Mom : -45 days => Sun 19-Aug-2001 (62 years old)
696\& Wedding Day : -32 days => Sat 1-Sep-2001 ( 9 years old)
697\& Cousin Paul : +13 days => Tue 16-Oct-2001 (30 years old)
698\& Sister Catherine : +18 days => Sun 21-Oct-2001 (27 years old)
699\& Spouse : +88 days => Sun 30-Dec-2001 (29 years old)
700.Ve
701.PP
702By the way, a similar program is included in the \*(L"examples\*(R"
703subdirectory of the Date::Calc distribution, called \*(L"anniversaries.pl\*(R".
704.PP
705See also the file \*(L"\s-1EXAMPLES\s0.txt\*(R" in the distribution's main directory
706for a short description of that little script.
707.SH "SEE ALSO"
708.IX Header "SEE ALSO"
709\&\fIDate::Calendar\fR\|(3), \fIDate::Calendar::Year\fR\|(3),
710\&\fIDate::Calc::Object\fR\|(3), \fIDate::Calc\fR\|(3).
711.SH "VERSION"
712.IX Header "VERSION"
713This man page documents \*(L"Date::Calendar::Profiles\*(R" version 5.3.
714.SH "AUTHOR"
715.IX Header "AUTHOR"
716.Vb 3
717\& Steffen Beyer
718\& mailto:sb@engelschall.com
719\& http://www.engelschall.com/u/sb/download/
720.Ve
721.SH "COPYRIGHT"
722.IX Header "COPYRIGHT"
723Copyright (c) 2000 \- 2002 by Steffen Beyer. All rights reserved.
724.SH "LICENSE"
725.IX Header "LICENSE"
726This package is free software; you can redistribute it and/or
727modify it under the same terms as Perl itself, i.e., under the
728terms of the \*(L"Artistic License\*(R" or the \*(L"\s-1GNU\s0 General Public License\*(R".
729.PP
730Please refer to the files \*(L"Artistic.txt\*(R" and \*(L"\s-1GNU_GPL\s0.txt\*(R"
731in this distribution for details!
732.SH "DISCLAIMER"
733.IX Header "DISCLAIMER"
734This package is distributed in the hope that it will be useful,
735but \s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of
736\&\s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0.
737.PP
738See the \*(L"\s-1GNU\s0 General Public License\*(R" for more details.