[Koha-bugs] [Bug 9723] Hourly loans don't show time due in OPAC
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Apr 24 20:22:36 CEST 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723
--- Comment #3 from Galen Charlton <gmcharlt at gmail.com> ---
The following diff shows how the TT filter might be updated to add a
as_due_date option:
diff --git a/Koha/Template/Plugin/KohaDates.pm
b/Koha/Template/Plugin/KohaDates.pm
index 134712f..37d03af 100644
--- a/Koha/Template/Plugin/KohaDates.pm
+++ b/Koha/Template/Plugin/KohaDates.pm
@@ -30,7 +30,9 @@ sub filter {
return "" unless $text;
$config->{with_hours} //= 0;
my $dt = dt_from_string( $text, 'iso' );
- return output_pref({ dt => $dt, dateonly => !$config->{with_hours} });
+ return $config->{as_due_date} ?
+ output_pref({ dt => $dt, as_due_date => 1 }) :
+ output_pref({ dt => $dt, dateonly => !$config->{with_hours} });
}
1;
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list