Date formatter would work like so:
%DATE_FORMAT(date,format)%
For example:
%DATE_FORMAT(%shelf_expire_time%,%m/%d)%
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
}
} catch(E) { dump(E+'\n'); }
+ // Date Format
+ try {
+ var match;
+ var date_format_patt=/%DATE_FORMAT\(([^,]*),([^)]*)\)%/
+ while(match = date_format_patt.exec(s))
+ s = s.replace(match[0], util.date.formatted_date(match[1], match[2]));
+ } catch(E) { dump(E+'\n'); }
+
// Substrings
try {
var match;
'notify_by_email_msg' : '',
'request_date' : '',
'request_date_msg' : '',
+ 'shelf_expire_time' : '',
'slip_date' : '',
'slip_date_msg' : '',
'user' : '',
msg += '\n';
print_data.request_date = util.date.formatted_date(check.payload.hold.request_time(),'%F');
print_data.request_date_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.request_date', [print_data.request_date]);
+ print_data.shelf_expire_time = check.payload.hold.shelf_expire_time();
msg += print_data.request_date_msg;
msg += '\n';
}