Menu Close Menu
Menu
  • Themes
  • Extensions
  • Showcase
  • Support
    • Documentation
    • Open Support Ticket
    • Terms & Conditions
  • Blog
  • Account
    • Number of items in cart: 0

      • Your cart is empty.
      • Subtotal: $0.00
      • Estimated Tax: $0.00
      • Total: $0.00
      • Checkout

How To Change Date Or Time Format

How To Change Date Or Time Format

Since version 2.2.2 the date and time format of matches has been determined by the settings in Settings > General.

You can easily change the format of date or time by either editing the templates directly or by hooking into the date/time filters which is the method descibed below.

Using Filters

The following filters are available to enable you to add your own formats if they need to be different from the WP settings date or time formats:

  • wpclubmanager_match_date_format
  • wpclubmanager_match_long_date_format
  • wpclubmanager_match_time_format

The following example demonstrates how to add your own date format. Simply add the following to your themes functions.php file or plugin, replacing the date format with your own:

function demo_date_format() {
    return 'j F Y';
}
add_filter( 'wpclubmanager_match_date_format', 'demo_date_format');

Here is a list of date/time formats and more infomation about formatting date and time.

9th October 2020

Post navigation

Previous

How To Change The Appearance Label

Docs Categories

  • Clubs (4)
  • Getting Started (4)
  • League Tables & Rosters (3)
  • Matches (6)
  • Players & Staff (9)
  • Plugin Settings (11)
  • Shortcodes (8)
  • Snippets (4)
  • Theming & Extending (3)
  • Widgets (6)

Popular Articles

  • Third Party Theme Compatibility
  • Match List Shortcode
  • Managing Clubs
  • League Table Shortcode
  • Quick Start Guide
  • Extensions
  • Themes
  • Showcase
  • Terms
  • Documentation
  • Support
  • Support Policy
  • Blog
© 2014-20 WP Club Manager | Manage your sports club website