Title: Inconsistent date output
Last modified: August 11, 2018

---

# Inconsistent date output

 *  [Evil Overlord](https://wordpress.org/support/users/evil-overlord/)
 * (@evil-overlord)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/inconsistent-date-output/)
 * I’m trying to put together a very simple formula that alternates content based
   on a date – if it’s before X, it says “story will be published”. If it’s on or
   after, it says “story was published”. I’ve thought I had this done several times,
   only to realize the output isn’t as anticipated. Now, I’m realizing it may not
   be me at all.
 * “Story” [if field=date before=’2018-08-10′] will be [else] was[/if] published
   on 10 August 2018.
    “Story” [if field=date before=’2018-08-11′] will be [else]
   was[/if] published on 11 August 2018. “Story” [if field=date before=’2018-08-
   12′] will be [else] was[/if] published on 12 August 2018.
 * For example, in two different posts, the same code gives different results.
 * Code (same for both posts)
 * “Story” [if field=date before=’2018-08-10′] will be [else] was[/if] published
   on 10 August 2018.
    “Story” [if field=date before=’2018-08-11′] will be [else]
   was[/if] published on 11 August 2018. “Story” [if field=date before=’2018-08-
   12′] will be [else] was[/if] published on 12 August 2018.
 * Result 1 (draft post that has seen multiple versions, was published once by mistake)
   “
   Story” was published on 10 August 2018. “Story” was published on 11 August 2018.“
   Story” was published on 12 August 2018.
 * Result 2 (code copied and pasted from above, never published, never saved)
    “
   Story” was published on 10 August 2018. “Story” was published on 11 August 2018.“
   Story” will be published on 12 August 2018.
 * Publishing the above in a post also gives different results for the same set 
   of formulas used twice. The first, gives the ‘will be’ result in the last line,
   while the second gives the ‘was’ result.

The topic ‘Inconsistent date output’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Evil Overlord](https://wordpress.org/support/users/evil-overlord/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/inconsistent-date-output/)
 * Status: not resolved