fixed typo that caused MARC21 leader form to emit 25 characters instead of 24
[koha_fer] / C4 / Dates.pm
index bfee3a5..320d04d 100644 (file)
@@ -24,7 +24,7 @@ use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 $VERSION = 0.03;
 @ISA = qw(Exporter);
-@EXPORT_OK = qw(DHTMLcalendar);
+@EXPORT_OK = qw(DHTMLcalendar format_date_in_iso format_date);
 
 my $prefformat = C4::Context->preference('dateformat');
 my $debug = $ENV{'DEBUG'} || 0;
@@ -132,6 +132,14 @@ sub visual {
        return $format_map{ eval { $self->{'dateformat'} } || $prefformat} ;
 }
 
+# like the functions from the old C4::Date.pm
+sub format_date {
+       return __PACKAGE__ -> new(shift,'iso')->output((@_) ? shift : $prefformat);
+}
+sub format_date_in_iso {
+       return __PACKAGE__ -> new(shift,$prefformat)->output('iso');
+}
+
 1;
 __END__