End of month Datetime Value processing Bug?

Hey,
This

gives this date 5 min ago

And this

gives this
image

From my understanding this should give me start and end of april, however today it gives may and yesterday it gave april (the action ran without closing orders yesterday but closed today).

So i think the value processer is buggy at end of month or date is 31.

1 Like

Hi! I believe this is in fact correct (not a bug) based on the screenshots :wink:

31.05 at 12:35 you say “Go to start of day”. That gives 30.05 22:00Z. Subtracting 1 month from this gives 30.04 22:00Z, which is the first of may in CET time… So, when performing that operation in CET time, you say “go to end of the month for the first of may”, which is 31st of may.

I see, so subracting one month is in reality subtract 30 days. In my opinion subtract one month should give you the previous month regardless of the start date of current month. As it stands it is a bit misleading not getting to previous month when subtracting one :slight_smile:

Call it a feature request then!

Hi,

It is in fact subtracting 1 month excactly. Both 31st of May at 10:00 and 30th of May will take you to 30th of April since April only has 30 days.

In fact, if you yse Date Now in your above screenshots instead of Date Today it will be correct in all scenarios.

This behaviour is defined by momentjs, which we use behind the scenes.

Aahhh my bad😊 thank you!

1 Like