refactored slashifyDate function out of inline code, created C4/Koha.pm
[koha_ffzg] / C4 / Koha.pm
1 package C4::Koha;
2
3 use strict;
4 require Exporter;
5
6 use vars qw($VERSION @ISA @EXPORT);
7   
8 $VERSION = 0.01;
9     
10 @ISA = qw(Exporter);
11 @EXPORT = qw(&slashifyDate); 
12
13 use vars qw();
14         
15
16 sub slashifyDate {
17     # accepts a date of the form xx-xx-xx[xx] and returns it in the 
18     # form xx/xx/xx[xx]
19     my @dateOut = split('-', shift);
20     return("$dateOut[2]/$dateOut[1]/$dateOut[0]")
21 }
22
23
24
25 1;
26 __END__
27
28 =head1 NAME
29
30 Koha - Perl Module containing convenience functions for Koha scripts
31
32 =head1 SYNOPSIS
33
34   use Koha;
35
36
37   $date = slashifyDate("01-01-2002")
38
39
40
41 =head1 DESCRIPTION
42
43 Koha.pm provides many functions for Koha scripts.
44
45 slashifyDate() takes a dash separated date string and returns a slash 
46 separated date string
47
48 =head1 AUTHOR
49
50 Pat Eyler, pate@gnu.org
51
52 =head1 SEE ALSO
53
54 perl(1).
55
56 =cut
57
58
59
60
61