[Koha-bugs] [Bug 13813] Remove deprecated module C4::Dates from system

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Aug 28 11:14:25 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13813

--- Comment #150 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Apart from the previous question, here are the results of the Dutch jury:

 =head2 DelItem
@@ -2128,7 +2128,7 @@ C<items.withdrawn>

 sub _set_defaults_for_add {
     my $item = shift;
-    $item->{dateaccessioned} ||= C4::Dates->new->output('iso');
+    $item->{dateaccessioned} || output_pref({ dt => dt_from_string, dateformat
=> 'iso', dateonly => 1 });
     $item->{$_} ||= 0 for (qw( notforloan damaged itemlost withdrawn));
 }
OOPS: You lost an important character || instead of ||= !!!!!!! 


C4/Members: $data->{message_date_formatted} = $d->output;   [ no longer added ]
  GetMessages
Not sure if you also resolved all calls of this sub accordingly.
Could you confirm?

C4/VirtualShelves
-                    $this_item->{'dateadded'} = format_date(
$this_item->{'dateadded'} );
+                    $this_item->{'dateadded'} = output_pref({ dt =>
dt_from_string( $this_item->{'dateadded'} ), dateformat => 'iso', dateonly => 1
});
No iso ?

circ.bookcount
-    lastdate                => $lastdate ?  format_date($lastdate) : 0,
+    lastdate                => $lastdate ? output_pref({ dt => dt_from_string(
$lastdate, 'iso' ), dateonly => 1 }) : 0,
No iso? 

-        format_date($date),
+        output_pref({ dt => dt_from_string( $date, 'iso' ), dateonly => 1 }),
Again.

moremember
+        $template->param( 'userdebarreddate' => output_pref({ dt =>
dt_from_string( $debar, 'iso' ), dateonly => 1 }) );
Looks different

members/printfeercpt.pl
-    my %row = ( 'date'              => format_date($accts->[$i]{'date'}),
+    my %row = ( 'date'              => output_pref({ dt => dt_from_string(
$accts->[$i]{'date'}, 'iso' ), dateonly => 1 }),
No iso?

members/printinvoice.pl
Again

opac-showreviews.pl
+        timestamp => strftime("%Y-%m-%dT%H:%M:%S-00:00", gmtime),
Could you confirm this is the same as rfc822
Since I see it more, would this be something for the KohaDates module too ?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list