--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
For more options, visit https://groups.google.com/d/optout.
I was going to use this method but people online warned that it could give incorrect results due to daylight saving time, hence why they chose to use the Calendar class.
I suppose for what I need it'll be fine.
Thanks again, Charlie.
var d = new Date(); var month = d.getMonth()+1; if (month < 10) { month = '0'+ month; } var day = d.getDate(); if (day < 10) { day = '0'+ day; } d.setDate(d.getDate() + 1); var month_tomorrow = d.getMonth()+1; if (month_tomorrow < 10) { month_tomorrow = '0'+ month_tomorrow; } var day_tomorrow = d.getDate(); if (day_tomorrow < 10) { day_tomorrow = '0'+ day_tomorrow; } var td = month+day; var tm = month_tomorrow+day_tomorrow;
Kind regards, Walter