var now = new Date()
var year = now.getFullYear()
var month = now.getMonth()
var day = now.getDate()
var tomorrow = new Date(0)
tomorrow.setFullYear(year, month, day + 1)
tomorrow.setHours(0, 0, 0, 0)
var shortDateFormat = Intl.DateTimeFormat(undefined, { dateStyle: "short" })
var t = shortDateFormat.format(tomorrow)
Adding 24 hours to the current time does not always get tomorrow because there could be a daylight saving time transition.
The user may not use "dd/mm/yyyy" as their preferred date format. shortDateFormat is a formatter that honors the user's preferences.
The user may not use "dd/mm/yyyy" as their preferred date format. shortDateFormat is a formatter that honors the user's preferences.
var nextDate = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);
var day = nextDate.getDate()
var month = nextDate.getMonth() + 1
var year = nextDate.getFullYear()
var t = `${day}/${month}/${year}`;
Note that Date.prototype.getMonth() is zero-based.
t is not zero padded, so it may have a single-digit day or month.
t is not zero padded, so it may have a single-digit day or month.