Title: Data Formatting
Last modified: December 14, 2025

---

# Data Formatting

 *  Resolved [landovloom](https://wordpress.org/support/users/landovloom/)
 * (@landovloom)
 * [5 months ago](https://wordpress.org/support/topic/data-formatting/)
 * Hi Alwyn
 * Thank you so much for this great plugin, that we would love to integrate.
 * Is there a way to change the formatting of an events date?
 * We are located in Switzerland and currently all dates are formatted like “M, 
   jS Y” where we would prefer something like “j. F Y” (with the month name in german
   instead of english).
 * It would also be great to be able to change the format of the events time to 
   24h instead of AM/PM.
 * Kind regards,
 * David

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

 *  Plugin Author [Alwyn Barry](https://wordpress.org/support/users/dramb/)
 * (@dramb)
 * [5 months ago](https://wordpress.org/support/topic/data-formatting/#post-18755820)
 * Hi David.
 * If you have any experience in coding, then you can use the plugin editor to edit
   the code to achieve this. The code is always in the cs-integration/public/shortcodes/
   class-cs-XXX-view.php files. For example the Event Card view code is on line 
   84 of the class-cs-event-card-view.php file and the time on line 86 and 87.
 * I could add date/time format options to the short code. The problem would be 
   sanitizing the input, but it’s doable. I’ll put it on my todo list, or you can
   raise a request on the GITHUB site.
 * I have created a block version of this plugin – see [https://en-gb.wordpress.org/plugins/blocks-for-churchsuite/](https://en-gb.wordpress.org/plugins/blocks-for-churchsuite/).
   It’s the same underlying code as this plugin, but exposes the attribute parameters
   in the block editor, and shows the results as you make changes. I haven’t got
   a date format or time format option in that yet either, but it is certainly possible.
 * Alwyn
 *  Plugin Author [Alwyn Barry](https://wordpress.org/support/users/dramb/)
 * (@dramb)
 * [5 months ago](https://wordpress.org/support/topic/data-formatting/#post-18755825)
 * Of course, I potentially could use something like:
 *     ```wp-block-code
       $fmt = new IntlDateFormatter('de-DE', IntlDateFormatter::SHORT, IntlDateFormatter::NONE);
       echo "DE: ".$fmt->format($d)."<br/>";
       ```
   
 * or to get a month name in a locale:
 *     ```wp-block-code
       $fmt = new IntlDateFormatter('de-DE', IntlDateFormatter::NONE, IntlDateFormatter::NONE, NULL, NULL, "MMM");$monthName = datefmt_format($fmt, mktime(0, 0, 0, $i));
       ```
   
 * … but I’m not sure how well this will work for each country – the format produced
   might still not be what’s wanted. Anyway, I’ll look into this.
    -  This reply was modified 5 months ago by [Alwyn Barry](https://wordpress.org/support/users/dramb/).
 *  Thread Starter [landovloom](https://wordpress.org/support/users/landovloom/)
 * (@landovloom)
 * [4 months, 4 weeks ago](https://wordpress.org/support/topic/data-formatting/#post-18761185)
 * Hi Alwyn
 * I opend a PR on your GitHub repo where i added the date / time format as optional
   options in the shortcode. Let me know what you think.
 * Kind regards,
   David
 *  Plugin Author [Alwyn Barry](https://wordpress.org/support/users/dramb/)
 * (@dramb)
 * [2 months, 2 weeks ago](https://wordpress.org/support/topic/data-formatting/#post-18832180)
 * Just to say that I’ve updated the Blocks-For-ChurchSuite plugin so that it now
   uses the Locale to format all date and time output. I’ll move the changes back
   into this plugin as I have opportunity in the days ahead. Sorry for the prolonged
   delay in this – personal circumstances prevented the work.
 *  Plugin Author [Alwyn Barry](https://wordpress.org/support/users/dramb/)
 * (@dramb)
 * [2 months, 2 weeks ago](https://wordpress.org/support/topic/data-formatting/#post-18832521)
 * Ok, the Locale sensitive code is in now, and so should work ‘automatically’ to
   get the Dates and Times rendered appropriate to location. However, it could still
   be dependent on the server – it uses ‘Default’ as the Locale setting, which is
   that of your server. If this doesn’t produce the required results, let me know
   and I’ll get it to pick up the Locale setting from the WordPress settings instead.
 *  Plugin Author [Alwyn Barry](https://wordpress.org/support/users/dramb/)
 * (@dramb)
 * [2 months, 2 weeks ago](https://wordpress.org/support/topic/data-formatting/#post-18834854)
 * I’ve moved the Block Plugin to get the defaults set up for the WordPress Website(
   in the ‘General’ Settings) for locale and default time and date formats, and 
   to render times and dates from those. This seems to work better – the server 
   default wasn’t a useful way forward. I’ve also factored the time/date localisation
   code out into a single module to reduce code glut and improve maintainability.
   So I’ll move that code change into this shortcode soon so all can benefit.
 *  Plugin Author [Alwyn Barry](https://wordpress.org/support/users/dramb/)
 * (@dramb)
 * [2 months, 2 weeks ago](https://wordpress.org/support/topic/data-formatting/#post-18836068)
 * Ok, since v1.0.8 the shortcodes are now set to output dates, day and month names,
   and times using the locale for a site as set in the WordPress settings page: 
   Settings->General. It will also use any custom time or date output set on that
   page. So, date/time output will automatically follow that set for the WordPress
   site.

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

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

 * ![](https://ps.w.org/cs-integration/assets/icon-256x256.png?rev=3257985)
 * [Integration for ChurchSuite](https://wordpress.org/plugins/cs-integration/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cs-integration/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cs-integration/)
 * [Active Topics](https://wordpress.org/support/plugin/cs-integration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cs-integration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cs-integration/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Alwyn Barry](https://wordpress.org/support/users/dramb/)
 * Last activity: [2 months, 2 weeks ago](https://wordpress.org/support/topic/data-formatting/#post-18836068)
 * Status: resolved