View | Details | Raw Unified | Return to bug 35646
Collapse All | Expand All

(-)a/C4/Serials.pm (-1 / +1 lines)
Lines 956-962 sub GetSeq { Link Here
956
    $newlastvalue3 = _numeration($newlastvalue3, $pattern->{numbering3}, $locale) if ($pattern->{numbering3}); # reset counter if needed.
956
    $newlastvalue3 = _numeration($newlastvalue3, $pattern->{numbering3}, $locale) if ($pattern->{numbering3}); # reset counter if needed.
957
    $calculated =~ s/\{Z\}/$newlastvalue3/g;
957
    $calculated =~ s/\{Z\}/$newlastvalue3/g;
958
958
959
    my $dt = dt_from_string( $subscription->{firstaquidate} );
959
    my $dt = dt_from_string( $subscription->{firstacquidate} );
960
    $calculated =~ s/\{Month\}/$dt->month/eg;
960
    $calculated =~ s/\{Month\}/$dt->month/eg;
961
    $calculated =~ s/\{MonthName\}/$dt->month_name/eg;
961
    $calculated =~ s/\{MonthName\}/$dt->month_name/eg;
962
    $calculated =~ s/\{Year\}/$dt->year/eg;
962
    $calculated =~ s/\{Year\}/$dt->year/eg;
(-)a/t/db_dependent/Serials.t (-4 / +2 lines)
Lines 560-566 subtest "test numbering pattern with dates in GetSeq GetNextSeq" => sub { Link Here
560
        skip_serialseq => 0,
560
        skip_serialseq => 0,
561
        irregularity   => '',
561
        irregularity   => '',
562
        locale         => 'C',            # locale set to 'C' to ensure we'll have english strings
562
        locale         => 'C',            # locale set to 'C' to ensure we'll have english strings
563
        firstaquidate  => '1970-11-01',
563
        firstacquidate => '1970-11-01',
564
    };
564
    };
565
    $pattern = {
565
    $pattern = {
566
        numberingmethod => '{Year} {Day} {DayName} {Month} {MonthName}',
566
        numberingmethod => '{Year} {Day} {DayName} {Month} {MonthName}',
Lines 568-574 subtest "test numbering pattern with dates in GetSeq GetNextSeq" => sub { Link Here
568
568
569
    my $numbering = GetSeq( $subscription, $pattern );
569
    my $numbering = GetSeq( $subscription, $pattern );
570
    is( $numbering, '1970 1 Sunday 11 November', 'GetSeq correctly calculates numbering from first aqui date' );
570
    is( $numbering, '1970 1 Sunday 11 November', 'GetSeq correctly calculates numbering from first aqui date' );
571
    $subscription->{firstaquidate} = '2024-02-29';
571
    $subscription->{firstacquidate} = '2024-02-29';
572
572
573
    $numbering = GetSeq( $subscription, $pattern );
573
    $numbering = GetSeq( $subscription, $pattern );
574
    is(
574
    is(
Lines 588-594 subtest "test numbering pattern with dates in GetSeq GetNextSeq" => sub { Link Here
588
588
589
};
589
};
590
590
591
592
subtest "_numeration" => sub {
591
subtest "_numeration" => sub {
593
592
594
    plan tests => 6;
593
    plan tests => 6;
595
- 

Return to bug 35646