Lines 132-143
sub generate_subfield_form {
Link Here
|
132 |
if ( ! defined( $value ) || $value eq '') { |
132 |
if ( ! defined( $value ) || $value eq '') { |
133 |
$value = $subfieldlib->{defaultvalue}; |
133 |
$value = $subfieldlib->{defaultvalue}; |
134 |
if ( $value ) { |
134 |
if ( $value ) { |
135 |
# get today date & replace <<YYYY>>, <<MM>>, <<DD>> if provided in the default value |
135 |
# get today date & replace <<YYYY>>, <<YY>>, <<MM>>, <<DD>> if provided in the default value |
136 |
my $today_dt = dt_from_string; |
136 |
my $today_dt = dt_from_string; |
137 |
my $year = $today_dt->strftime('%Y'); |
137 |
my $year = $today_dt->strftime('%Y'); |
|
|
138 |
my $shortyear = $today_dt->strftime('%y'); |
138 |
my $month = $today_dt->strftime('%m'); |
139 |
my $month = $today_dt->strftime('%m'); |
139 |
my $day = $today_dt->strftime('%d'); |
140 |
my $day = $today_dt->strftime('%d'); |
140 |
$value =~ s/<<YYYY>>/$year/g; |
141 |
$value =~ s/<<YYYY>>/$year/g; |
|
|
142 |
$value =~ s/<<YY>>/$shortyear/g; |
141 |
$value =~ s/<<MM>>/$month/g; |
143 |
$value =~ s/<<MM>>/$month/g; |
142 |
$value =~ s/<<DD>>/$day/g; |
144 |
$value =~ s/<<DD>>/$day/g; |
143 |
# And <<USER>> with surname (?) |
145 |
# And <<USER>> with surname (?) |
144 |
- |
|
|