Convertir variables fechas (TDMobile) en string dd/mm

PHOTO EMBED

Mon Apr 25 2022 09:10:28 GMT+0000 (Coordinated Universal Time)

Saved by @arivasgran #javascript

dsDate2DDMM = function (date) {
    date = date instanceof Date ? date : date.Value;
    let year = date.getFullYear();
    if (year <= 1900) {
        return null;
    }
    let month = date.getMonth() + 1;
    let day = date.getDate();
    return ((day < 10 ? '0' + day : day) + '/' + (month < 10 ? '0' + month : month));
}
content_copyCOPY