Closed euthanato closed 7 years ago
My IDE gives me an error when I try to use the strings for hour and min to create a Date. Date is expecting numbers.
When I change these lines I get a notification created one month from today at 8AM.
var hour = 8; var min = 0;
Is this still an issue? Its not been updated in six months?
No update from original poster so closing.
I have trouble setting the time, it does not run when I ask and I have no idea how to do it, please can you help me?
Here the code:
var time = new Date(); var year = time.getUTCFullYear(); var month = time.getUTCMonth() + 1; var day = time.getUTCDate(); var hour = '08'; var min = '00'; var reserv = new Date(year,month,day,hour,min); cordova.plugins.notification.local.schedule({ id: 1, title: "BeShanti", text: "Detox", every: "day", // "minute", "hour", "week", "month", "year" firstAt: reserv, //at: alarma, icon: "img://logo.jpg" });