-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
The %k format can escape if nHour === 0 as 0 || '' => ''. It needs to be stringified. This is a simple fix:
#4
But maybe there are other formats where this applies? Any format expression that returns a number that could be 0, '' or any other falsy value needs to be stringified.
Instead why not have
function(sMatch) {
var fmt={
'%a': aDays[nDay].slice(0,3),
...
'%Z': date.toTimeString().replace(/.+\((.+?)\)$/, '$1')
}[sMatch];
if (typeof(fmt) === undefined) fmt = sMatch;
return fmt +'';
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels