All characters not part of the format were replaced by "undefined"

This commit is contained in:
Marc Delisle 2013-05-19 07:49:53 -04:00
parent 8267c32218
commit be6bdb76ec

View File

@ -163,7 +163,7 @@ function formatDate(date, format) {
while ((format.charAt(i_format) == c) && (i_format < format.length)) {
token += format.charAt(i_format++);
}
if (value[token] !== null) {
if (value[token] !== null && value[token] !== undefined) {
result = result + value[token];
} else {
result = result + token;