Homey Community Forum

Calculate date of tomorrow

Hi there

I’m tying to create a variable for the date of tomorrow. I’ve taken multiple attempts with logics but I still haven’t succeeded.

My goal is to have a label for the date of tomorrow so I can use this for push notifications . Can anyone help me out with an example how I can arrange this?

Thanks in advance.

I made a few flows which determine the month (January, February etc.) and day (1st day, 2nd day etc.). I needed them to be in separate logic cards for my flows. I found it easier to determine those seperately, rather than determining the exact date in one card.

It basically boils down to twelve different flows for the months (which checks every day at 0:05 in the night which month it is) and a flow that sets a number variable to 1 when it’s the first of the month, and increments it otherwise, every day at 0:04 in the night. That way it doesn’t matter whether the month has 31 or 30 days (or 29/28 > February). All you need to do, is adjust the flow for the day. I’ll share it in a bit.

image

Hi Neuron 44,

Thanks for your feedback. I will give it a try.

Watch this video before you want to do anything with date calculations :wink:

1 Like