Skip to content

Commit

Permalink
Need a number for the month
Browse files Browse the repository at this point in the history
  • Loading branch information
briandfoy committed Mar 22, 2023
1 parent bfb6e2c commit f2c516e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/make_default_data.pl
Expand Up @@ -91,8 +91,12 @@ =head1 COPYRIGHT AND LICENSE
(?<mon> [a-z]+ ) \s
(?<year> \d+ )
/ix;
my %months = map { state $n = 1; $_ => $n++ }
qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
my( $year, $day ) = @+{qw(year day)};
my( $month ) = $months{ $+{mon} };

my $new_version_date = sprintf '%4d%02d%02d', @+{qw(year mon day)};
my $new_version_date = sprintf '%4d%02d%02d', $year, $month, $day;
my $current_date = Business::ISBN::Data->VERSION;
my( $major, $minor ) = split /\./, $current_date;

Expand Down

0 comments on commit f2c516e

Please sign in to comment.