• Resolved TomboAhi

    (@tomboahi)


    This plugin is awesome, but I believe I am missing something here on a yearly schedule I am creating that changes the text each month.

    First it appears that I *must* use an ondate/offdate, if I leave those out, they all show all the time. So by putting them in I was able to resolve however, August and September still show together. Here is a snippet of what I have..

    [time-restrict-repeat type="annually" onmonth="July" offmonth="August" ondate="01" offdate="31"]
    <strong>July</strong> Hey! It is July
    [/time-restrict-repeat]
    
    [time-restrict-repeat type="annually" onmonth="August" offmonth="September" ondate="01" offdate="31"]
    <strong>August:</strong> Hey! It is August
    [/time-restrict-repeat]
    
    [time-restrict-repeat type="annually" onmonth="September" offmonth="October" ondate="01" offdate="30"]
    <strong>September:</strong> Hey! It is September 
    [/time-restrict-repeat]
    
    [time-restrict-repeat type="annually" onmonth="October" offmonth="November" ondate="01" offdate="31"]
    <strong>October:</strong> Hey! It is October 
    [/time-restrict-repeat]

    Is there something I am missing that is causing both August & Sept to show up together?

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter TomboAhi

    (@tomboahi)

    I believe I figured out my mistake (it was a foolish one) so then my question would be, since I must include ondate/offdate, which of the two would you deem the better practice assuming I want it to show for the entire month and switch over at midnight between the last day of the month and the first day of the month?

    [time-restrict-repeat type="annually" onmonth="July" offmonth="August" ondate="01" offdate="01"]
    <strong>July</strong> Hey! It is July
    [/time-restrict-repeat]

    OR

    
    [time-restrict-repeat type="annually" onmonth="July" offmonth="July" ondate="01" offdate="31"]
    <strong>July</strong> Hey! It is July
    [/time-restrict-repeat]

    If this could be modified to leave out the ondate/offdate, we wouldn’t have to worry about leap years ;p

    Thanks again.

    • This reply was modified 8 years, 2 months ago by TomboAhi.
    Thread Starter TomboAhi

    (@tomboahi)

    So I ran into another issue and this one seems to be a genuine bug and not a logic issue. It appears that if an offmonth/offdate is applied to an annual repeating schedule the startdate is offset by 1 day.

    For example, today is 9/2 and the following logic should show both items, however only the first item shows.

    [time-restrict-repeat type="annually" onmonth="August" offmonth="September" ondate="02" offdate="03"]
    August 2 - September 3
    [/time-restrict-repeat]
    
    [time-restrict-repeat type="annually" onmonth="September" offmonth="October" ondate="02" offdate="03"]
    September 2 - October 3
    [/time-restrict-repeat]

    If I modify the second item by removing offmonth/offdate it works.
    If I modify the second item by changing the ondate to 01 it works.

    Is my expection that the following logic to have something different show up for each month on an annual basis correct?

    [time-restrict-repeat type="annually" onmonth="January" offmonth="February" ondate="01" offdate="01"]Shows On Jan 1 00:00:00 - Hides on Feb 1 00:00:00[/time-restrict-repeat]
    
    [time-restrict-repeat type="annually" onmonth="February" offmonth="March" ondate="01" offdate="01"]Shows on Feb 1 00:00:00 - Hides on Mar 1 00:00:00[/time-restrict-repeat]
    
    etc...
    • This reply was modified 8 years, 2 months ago by TomboAhi.
    Plugin Author Dave Clements

    (@thewanderingbrit)

    The logic is correct. I’m betting it’s a timezone issue. P.S., if you want something to show up for one full month, it should be more like:

    [time-restrict-repeat type="annually" onmonth="July" offmonth="July" ondate="01" offdate="31"]
    <strong>July</strong> Hey! It is July
    [/time-restrict-repeat]

    where the onmonth and offmonth are the same, as this logic effectively says “on from July 01 at 12AM to July 31 at 11:59:59PM”. For February, you could just:

    [time-restrict-repeat type="annually" onmonth="February" offmonth="March" ondate="01" offdate="01" offtime="00:00:01"]
    <strong>February</strong> Hey! It is February
    [/time-restrict-repeat]
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Overlap Issues’ is closed to new replies.