How to make tracks alternate within a yearly recurring date range

You have a question or need an advice about how to do something? Ask it here!
Breakie
Posts: 14
Joined: 21 May 2019 18:12
How to make tracks alternate within a yearly recurring date range

Post by Breakie »

I'm trying to setup two tracks (in a cartwall library) with a different date range restriction so they play or do not play during a certain period (summer).
In both tracks I defined a date range:

Track 1 = 01/09/2022 - 20/06/23
Track 2 = 21/06/2023 - 31/08/2023

I would like to have this scenario to repeat every year.
I tried to enable the "ignore year" option in both tracks, but that does not work because when the year is stripped the start of the date range for track 1 is in the future

The concerning scriptline = cartwall pointing to the cartwall library that contains both tracks.
How can this be accomplished?

Any idea's??
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: How to make tracks alternate within a yearly recurring date range

Post by radio42 »

No, this is not the case!
When the 'Repeated (Ignore Year)' option is selected, ProppFrexx always uses internally the year 2016 as a reference and also ensures if the start date is bigger that the end date. So all should work as designed.
Breakie
Posts: 14
Joined: 21 May 2019 18:12
Re: How to make tracks alternate within a yearly recurring date range

Post by Breakie »

Hi Bernd, as stated above, as soon as I turn the ignore year option on, it no longer works ...
Can this be caused by something else?
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: How to make tracks alternate within a yearly recurring date range

Post by radio42 »

I didn't know, that it was not working...as you just assumed, that the start of the date range for track 1 is in the future - but that is not the case.
However...
But I just double-checked it and there was indeed a glitch in the 'ignore year' this will be fixed asap in the next release!

So as explained, with the 'year ignored' the conditions will be using 2016 (i.e. the year component is ignored!), so the condition will be (a track is NOT played when):
Track 1 = 01/09/2016 - 20/06/2016
Track 2 = 21/06/2016 - 31/08/2016

For the comparison, the current date time is also ignored.
E.g. if today is the 17/06/2023, this will also now be 17/06/2016!

When the StartDate is greater than the EndDate, it is matching when:
currentDate < EndDate OR currentDate > StartDate
Else:
currentDate >= StartDate AND currentDate <= EndDate

This means, for the tracks:
Track 1: 17/06/2016 < 20/6/2016 OR 17/06/2016 > 01/09/2016 => true
Track 2: 17/06/2016 >= 21/06/2016 AND 17/06/2016 <= 31/08/2016 => false

Without the 'ignore year' option:
Track 1: 17/06/2023 >= 01/09/2022 AND 17/06/2023 <= 20/06/2023 => true
Track 2: 17/06/2023 >= 21/06/2023 AND 17/06/2023 <= 31/08/2016 => false
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: How to make tracks alternate within a yearly recurring date range

Post by radio42 »

Fixed in the new v4.4.0.0!
Breakie
Posts: 14
Joined: 21 May 2019 18:12
Re: How to make tracks alternate within a yearly recurring date range

Post by Breakie »

OK great, thank you :)
Breakie
Posts: 14
Joined: 21 May 2019 18:12
Re: How to make tracks alternate within a yearly recurring date range

Post by Breakie »

Hi Bernd, I installed v4.4.0.0, but ... the issue remains!
I ran some tests in one of our scripts and still the wrong tracks are picked.
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: How to make tracks alternate within a yearly recurring date range

Post by radio42 »

How did you test it? As I also tested it and only the one (correct) track was picked…
I used the Script Test function.
Please also do that and provide the output of it…
Breakie
Posts: 14
Joined: 21 May 2019 18:12
Re: How to make tracks alternate within a yearly recurring date range

Post by Breakie »

Hi Bernd, I sent you a PM with the output.
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: How to make tracks alternate within a yearly recurring date range

Post by radio42 »

I provided a new version v4.4.0.1-beta... so "Check for Beta-Versions..." to update.

The defaut behaviour 'was', that the date was not checked inclusive the end date (which I agree is not logic for a date range, even it was consistent to the time range check). That's why it failed in your case today, as today is exactly the end date of one condition.

So in the v4.4.0.1 I changed the check for the date range, so that both, the start and end date are always checked inclusive (i.e. including that date).

Post Reply