INNER CODE UNIT · JavaScript
daysUntilEOL
parse-community/Parse-SDK-Flutter · scripts/check-version-support.js:80
const daysUntilEOL = eolDate ? Math.floor((eolDate - today) / (1000 * 60 * 60 * 24)) : null;
let status = 'supported';
let warning = null;
if (eolDate) {
if (today >= eolDate) {
status = 'expired';
warning = `Support expired on ${formatHumanDate(eolDate)}`;
} else if (daysUntilEOL <= 30) {
status = 'expiring-soon';
warning = `Support expires in ${daysUntilEOL} days`;
} else if (daysUntilEOL <= 60) {
status = 'warning';
warning = `Support expires in ${Math.floor(daysUntilEOL / 30)} month(s)`;
}
}