Title: Overlap Issues
Last modified: September 2, 2016

---

# Overlap Issues

 *  Resolved [TomboAhi](https://wordpress.org/support/users/tomboahi/)
 * (@tomboahi)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/overlap-issues/)
 * 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](https://wordpress.org/support/users/tomboahi/)
 * (@tomboahi)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/overlap-issues/#post-7822459)
 * 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 9 years, 9 months ago by [TomboAhi](https://wordpress.org/support/users/tomboahi/).
 *  Thread Starter [TomboAhi](https://wordpress.org/support/users/tomboahi/)
 * (@tomboahi)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/overlap-issues/#post-7871562)
 * 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 9 years, 9 months ago by [TomboAhi](https://wordpress.org/support/users/tomboahi/).
 *  Plugin Author [Dave Clements](https://wordpress.org/support/users/thewanderingbrit/)
 * (@thewanderingbrit)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/overlap-issues/#post-8353950)
 * 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.

 * ![](https://ps.w.org/shortcodes-to-show-or-hide-content/assets/icon-256x256.jpg?
   rev=984372)
 * [Show/Hide Content at Set Time](https://wordpress.org/plugins/shortcodes-to-show-or-hide-content/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcodes-to-show-or-hide-content/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcodes-to-show-or-hide-content/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcodes-to-show-or-hide-content/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcodes-to-show-or-hide-content/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcodes-to-show-or-hide-content/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Dave Clements](https://wordpress.org/support/users/thewanderingbrit/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/overlap-issues/#post-8353950)
 * Status: resolved