I want to convert to date to UTC due to cookie set expires date.
const date = new Date();
date.setDate(date.getDate() + 1); // 1days add
$.cookie('AA', '', {
expires: new Date(Date.UTC(date.getFullYear(), date.getMonth(),
date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds())),
});
This code works well.. But, I want to know efficient and compact code! Pleae tell me the other opinions!!