• Resolved absoluteweb

    (@absoluteweb)


    Hi,

    There is a bug in this function:

    function tribe_get_date_format( $with_year = false ) {
    		if ( $with_year ) {
    			$format = tribe_get_date_option( 'dateWithYearFormat', get_option( 'date_format' ) );
    		} else {
    			$format = tribe_get_date_option( 'dateWithoutYearFormat', 'F j' );
    		}

    When year don’t have to be displayed, date format is hard coded to ‘F j’ :-(.

    Nicolas.

    https://www.ads-software.com/plugins/the-events-calendar/

Viewing 1 replies (of 1 total)
  • Hey absoluteweb,

    Thanks for reaching out to us here!

    Looking at the tribe_get_date_option() function, it looks like this will show the hard coded “F j” only if there isn’t a “Date without year” value added under the Event Settings > Display tab.

    If you need further flexibility from there, you can filter that output utilizing the “tribe_date_format” filter or, since the tribe_date_format() function is pluggable there, you can completely rewrite that function within your theme if you needed to change that fallback.

    Thanks!
    Josh

Viewing 1 replies (of 1 total)
  • The topic ‘Date format bug’ is closed to new replies.