• timonw

    (@timonw)


    Hallo,
    I think in function em_display_event_date there is one important case missing. If start and end are on the same day but the hour is also the same. This would be if there is only a starttime with open end.

    Now you would have an output like “05.11.2015 19:00 – 19:00” but “05.11.2015 19:00” would be much nicer. I have many events with just a start-time.

    https://www.ads-software.com/plugins/events-maker/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author dFactory

    (@dfactory)

    Good suggestion @timonw,
    added to our todo list for Events Maker.

    Thread Starter timonw

    (@timonw)

    Hallo,
    until this is solved…
    I would like to have all events an all-day-event. Is there a possibility to set “all-day” as default, so that I can hide the checkbox via CSS?
    Perhaps via function.php?

    Thanks,
    Timon

    stumbled upon the same and seems to be open until now ??

    here is a simple hack:

    in “template-functions.php”

    line #433 add:

    // is not all day, one day, same hours // ERICH
    		elseif ( ! $all_day_event && ! empty( $date['start'] ) && ! empty( $date['end'] ) && ( $date['start'] == $date['end'] ) ) {
    			$date_output = em_format_date( $date['start'], 'datetime', $format );
    		}

    before

    // is not all day, one day, different hours
    		elseif ( ! $all_day_event && ! empty( $date['start'] ) && ! empty( $date['end'] ) ) {
    			// one day only
    			if ( em_format_date( $date['start'], 'date' ) === em_format_date( $date['end'], 'date' ) ) {
    				$date_output = em_format_date( $date['start'], 'datetime', $format ) . ' ' . $args['separator'] . ' ' . em_format_date( $date['end'], 'time', $format );
    			}
    			// more than one day
    			else {
    				$date_output = em_format_date( $date['start'], 'datetime', $format ) . ' ' . $args['separator'] . ' ' . em_format_date( $date['end'], 'datetime', $format );
    			}
    		}

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘start & end: same day, same hour’ is closed to new replies.