Add a bunch of Rael plugins.
[matthijs/upstream/blosxom-plugins.git] / general / date_fullname
1 # Blosxom Plugin: date_fullname
2 # Author(s): Rael Dornfest <rael@oreilly.com>
3 # and Tamara Crowe <tamara@darkglass.org>
4 # Version: 2.0b4
5 # Documentation: See the bottom of this file or type: perldoc date_fullname
6
7 package date_fullname;
8
9 # --- Configurable variables -----
10
11 # A list of full month names rather than Jan, Feb, ...
12 my @months = qw! 00 January February March April May June July August September October November December !;
13
14 # A list of full day names rather than Mon, Tue, ...
15 my %daysoftheweek = ( Mon=>'Monday', Tue=>'Tuesday', Wed=>'Wednesday', Thu=>'Thursday', Fri=>'Friday', Sat=>'Saturday', Sun=>'Sunday' );
16
17 # --------------------------------
18
19 $dw; # use $date_fullname::dw for full day-of-the-week name (e.g. Monday)
20 $mo; # use $date_fullname::mo for full month name (e.g. January)
21
22 sub start {
23   1;
24 }
25
26 sub date {
27   my ($pkg, $path, $date_ref, $mtime, @date_bits) = @_;
28
29   $dw = $daysoftheweek{$date_bits[0]};
30   $mo = $months[$date_bits[2]];
31
32   1;
33 }
34
35 1;
36
37 __END__
38
39 =head1 NAME
40
41 Blosxom Plug-in: date_fullname
42
43 =head1 SYNOPSIS
44
45 Purpose: Populates $date_fullname::dw (day of the week) and 
46 $date_fullname::mo (month name) with full day and month names,
47 respectively.
48
49 =head1 VERSION
50
51 2.0b4
52
53 Version number coincides with the version of Blosxom with which the 
54 current version was first bundled.
55
56 =head1 AUTHORS
57
58 Rael Dornfest <rael@oreilly.com> and Tamara Crowe <tamara@darkglass.org>
59
60 =head1 SEE ALSO
61
62 Blosxom Home/Docs/Licensing: http://www.raelity.org/apps/blosxom/
63
64 Blosxom Plugin Docs: http://www.raelity.org/apps/blosxom/plugin.shtml
65
66 =head1 BUGS
67
68 Address bug reports and comments to the Blosxom mailing list 
69 [http://www.yahoogroups.com/group/blosxom].
70
71 =head1 LICENSE
72
73 Blosxom and this Blosxom Plug-in
74 Copyright 2003, Rael Dornfest 
75
76 Permission is hereby granted, free of charge, to any person obtaining a
77 copy of this software and associated documentation files (the "Software"),
78 to deal in the Software without restriction, including without limitation
79 the rights to use, copy, modify, merge, publish, distribute, sublicense,
80 and/or sell copies of the Software, and to permit persons to whom the
81 Software is furnished to do so, subject to the following conditions:
82
83 The above copyright notice and this permission notice shall be included
84 in all copies or substantial portions of the Software.
85
86 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
87 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
88 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
89 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
90 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
91 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
92 OTHER DEALINGS IN THE SOFTWARE.