Title: PHP date format content being removed?
Last modified: July 19, 2026

---

# PHP date format content being removed?

 *  Resolved [Erik Harris](https://wordpress.org/support/users/eharris/)
 * (@eharris)
 * [2 weeks, 5 days ago](https://wordpress.org/support/topic/php-date-format-content-being-removed/)
 * I just started using Simple Calendar to track “exceptions” (primarily cancellations)
   for classes on a regular schedule (the “Exceptions” block just to the right of
   the schedule table), and I’ve got it working as I’d like except for one simple
   thing… I’d like the date ordinal suffix to be superscript. I’ve found multiple
   resources explaining how to do exactly what I want, and they all agree that the
   PHP date format in one of these calendar definitions should work:
 *     ```wp-block-code
       <strong>[start-date format="D, M j\<\s\u\p\>S\<\/\s\u\p\>"]:</strong> [title]
       ```
   
 * or…
 *     ```wp-block-code
       <strong>[start-date format="D, M j<\s\up>S</\s\up>"]:</strong> [title]
       ```
   
 * I’ve tried both, but I’m currently using the one on top (just in case a future
   version of PHP adds more characters that it interprets as functional, as 5.2.2
   did). Neither of them work. It seems that Simple Calendar might be stripping 
   everything out **except** for one of the backslashes. My page code contains a
   span with this property. Note the extra “\” inside the quotes, which disappears
   if I just use the “D, M jS” format without trying to add in the superscript tags.
 *     ```wp-block-code
       data-event-format="D, M jS\"
       ```
   
 * Is there something I can do in my calendar definition to fix this? Am I making
   an error I can’t find? Or is it something that can’t be done without an update
   to Simple Calendar?
 * Note that the calendar on the linked page only shows anything if there are calendar
   entries labeled as exceptions within the upcoming 60 days, so depending on when
   you look at this, there might not be any to see (there’s one right now)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-date-format-content-being-removed%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Erik Harris](https://wordpress.org/support/users/eharris/)
 * (@eharris)
 * [2 weeks, 5 days ago](https://wordpress.org/support/topic/php-date-format-content-being-removed/#post-18969390)
 * Additional note: I also tried setting the date format within the “Advanced” tab
   for the calendar, but that interface appears to have a more significant issue
   with embedded tags. Upon saving my custom date code, it changed it to `D, M j\
   S\`, which is obviously problematic, since it just displays “S” in place of the
   ordinal suffix.
 *  Plugin Support [john](https://wordpress.org/support/users/johnweru/)
 * (@johnweru)
 * [2 weeks, 5 days ago](https://wordpress.org/support/topic/php-date-format-content-being-removed/#post-18969684)
 * Hi Erik,
 * Thanks for reaching out to us.
   About your query here, Unfortunately, the format
   parameter only supports PHP date format characters, so HTML such as “<sup>” isn’t
   supported. As a result, the ordinal suffix cannot currently be rendered as superscript
   using the event template tags alone. Achieving this would require a custom code
   modification to the plugin or an enhancement to the plugin itself. I have added
   this as a feature request for consideration by the development team.
 * Should you have any questions in the meantime, please feel free to reach out 
   once again.
 * Regards
 *  Thread Starter [Erik Harris](https://wordpress.org/support/users/eharris/)
 * (@eharris)
 * [2 weeks, 4 days ago](https://wordpress.org/support/topic/php-date-format-content-being-removed/#post-18970512)
 * Thanks for the quick response and explanation!
 * Since you’re adding it as a feature request in your internal tracker, I’ll mark
   this support question as resolved.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-date-format-content-being-removed%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/google-calendar-events/assets/icon-256x256.png?rev=1263960)
 * [Simple Calendar - Google Calendar Plugin](https://wordpress.org/plugins/google-calendar-events/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-calendar-events/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-calendar-events/)
 * [Active Topics](https://wordpress.org/support/plugin/google-calendar-events/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-calendar-events/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-calendar-events/reviews/)

## Tags

 * [date](https://wordpress.org/support/topic-tag/date/)
 * [format](https://wordpress.org/support/topic-tag/format/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [tags](https://wordpress.org/support/topic-tag/tags/)

 * 3 replies
 * 2 participants
 * Last reply from: [Erik Harris](https://wordpress.org/support/users/eharris/)
 * Last activity: [2 weeks, 4 days ago](https://wordpress.org/support/topic/php-date-format-content-being-removed/#post-18970512)
 * Status: resolved