From dfb8f224faf5e65d06712f8638a08f788cc46909 Mon Sep 17 00:00:00 2001 From: Victor Grousset/tuxayo Date: Thu, 14 Jul 2022 00:04:58 +0200 Subject: [PATCH] Revert "Bug 30035: Fix month name in prediction pattern" This reverts commit c9253082bbbe3bc2529188b0e908053d72b77eff. Signed-off-by: Victor Grousset/tuxayo --- C4/Serials.pm | 2 +- t/db_dependent/Serials.t | 21 +-------------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index d27f08a171..709a24315a 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -2503,7 +2503,7 @@ sub _numeration { locale => $locale, ); $string = $num_type =~ /^monthname$/ - ? $dt->format_cldr( "LLLL" ) + ? $dt->strftime("%B") : $dt->strftime("%b"); } elsif ( $num_type =~ /^season$/ ) { my @seasons= qw( Spring Summer Fall Winter ); diff --git a/t/db_dependent/Serials.t b/t/db_dependent/Serials.t index d052148bc1..981765dad7 100755 --- a/t/db_dependent/Serials.t +++ b/t/db_dependent/Serials.t @@ -17,7 +17,7 @@ use Koha::DateUtils; use Koha::Acquisition::Booksellers; use t::lib::Mocks; use t::lib::TestBuilder; -use Test::More tests => 50; +use Test::More tests => 49; BEGIN { use_ok('C4::Serials'); @@ -452,22 +452,3 @@ subtest "NewSubscription|ModSubscription" => sub { is( $serials->count, 1, "Still only one serial" ); is( $serials->next->biblionumber, $biblio_2->biblionumber, 'ModSubscription should have updated serial.biblionumber'); }; - -subtest "_numeration" => sub { - - plan tests => 6; - - my $s = C4::Serials::_numeration(0, 'monthname', 'cat'); - is( $s, "gener" ); - $s = C4::Serials::_numeration(0, 'monthname', 'es'); - is( $s, "enero" ); - $s = C4::Serials::_numeration(0, 'monthname', 'fr'); - is( $s, "janvier" ); - - $s = C4::Serials::_numeration(0, 'monthabrv', 'cat'); - is( $s, "de gen." ); - $s = C4::Serials::_numeration(0, 'monthabrv', 'es'); - is( $s, "ene" ); - $s = C4::Serials::_numeration(0, 'monthabrv', 'fr'); - is( $s, "janv." ); -}; -- 2.39.5