@@ -, +, @@ --- Koha/DateUtils.pm | 7 ++++++- Koha/Template/Plugin/KohaAuthorisedValues.pm | 5 +++++ 2 files changed, 11 insertions(+), 1 deletions(-) --- a/Koha/DateUtils.pm +++ a/Koha/DateUtils.pm @@ -21,13 +21,14 @@ use warnings; use 5.010; use DateTime; use DateTime::Format::DateParse; +use DateTime::Format::MySQL; use C4::Context; use base 'Exporter'; use version; our $VERSION = qv('1.0.0'); our @EXPORT = ( - qw( dt_from_string output_pref format_sqldatetime output_pref_due format_sqlduedatetime) + qw( dt_from_string output_pref format_sqldatetime output_pref_due format_sqlduedatetime get_timestamp ) ); =head1 DateUtils @@ -239,4 +240,8 @@ sub format_sqlduedatetime { return q{}; } +sub get_timestamp { + return DateTime::Format::MySQL->format_datetime( dt_from_string() ); +} + 1; --- a/Koha/Template/Plugin/KohaAuthorisedValues.pm +++ a/Koha/Template/Plugin/KohaAuthorisedValues.pm @@ -47,4 +47,9 @@ sub GetByCode { return GetAuthorisedValueByCode( $category, $code, $opac ); } +sub Get { + my ( $self, $category, $selected, $opac ) = @_; + return GetAuthorisedValues( $category, $selected, $opac ); +} + 1; --