How can I change the date format displayed for dates throughout the plugin?

The plugin will use the date/time format you’ve specific in the general WordPress settings (Settings > General). That’s the easiest way to set the format. You can read more about the possibilities in the WordPress Codex.

Alternatively, you can override the general settings by modifying the template views. For any of the template views that display the start or end date & time for an event you can simply pass in PHP date strings to re-format the date/time. To modify template views, please see our Themer’s Guide. In general though, if you see one of the start or end date & time functions (tribe_get_end_date() or tribe_get_start_date()) you can simply pass in the PHP date string in the third argument slot in the function to re-format the date like so:

echo tribe_get_start_date( $post->ID, false, 'D. M j, Y' );

That would display the start date like: Mon. Jan. 15th, 2012

To add the time, just change the second argument to true to display the time:

echo tribe_get_start_date( $post->ID, true, 'D. M j, Y' );

That would display the start date like: Mon. Jan. 15th, 2012 6:00pm

Posted in: Troubleshooting

Modern Tribe Newsletter

Insight, Discounts & Notices for People Who Kick Ass..