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