You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before checking for instanceof, date needs to be converted to Date object
and need to be checked for valid date just incase date is a null or empty string
function strftime(sFormat, sDate) {
if (typeof sFormat !== 'string') {
return '';
}
if (sDate == "") {return sDate;}
let date = new Date(sDate);
if (!(date instanceof Date && !isNaN(date))) {
return sDate;
}
The text was updated successfully, but these errors were encountered:
Before checking for instanceof, date needs to be converted to Date object
and need to be checked for valid date just incase date is a null or empty string
The text was updated successfully, but these errors were encountered: