Title: start &amp; end: same day, same hour
Last modified: August 30, 2016

---

# start & end: same day, same hour

 *  [timonw](https://wordpress.org/support/users/timonw/)
 * (@timonw)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/start-end-same-day-same-hour/)
 * 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://wordpress.org/plugins/events-maker/](https://wordpress.org/plugins/events-maker/)

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

 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/start-end-same-day-same-hour/#post-6738921)
 * Good suggestion [@timonw](https://wordpress.org/support/users/timonw/),
    added
   to our todo list for Events Maker.
 *  Thread Starter [timonw](https://wordpress.org/support/users/timonw/)
 * (@timonw)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/start-end-same-day-same-hour/#post-6739046)
 * 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
 *  [Erich Munz](https://wordpress.org/support/users/erich_k4wp/)
 * (@erich_k4wp)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/start-end-same-day-same-hour/#post-6739101)
 * 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.

 * ![](https://ps.w.org/events-maker/assets/icon-256x256.png?rev=1574084)
 * [Events Maker by dFactory](https://wordpress.org/plugins/events-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/events-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-maker/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Erich Munz](https://wordpress.org/support/users/erich_k4wp/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/start-end-same-day-same-hour/#post-6739101)
 * Status: not resolved