Code Duplication    Length = 4-6 lines in 2 locations

_inc/lib/icalendar-reader.php 2 locations

@@ 843-846 (lines=4) @@
840
		$two_dates = __( '%1$s – %2$s' , 'jetpack' );
841
842
		// we'll always have the start date. Maybe with time
843
		if ( $all_day )
844
			$date = date_i18n( $date_format, $start );
845
		else
846
			$date = sprintf( $date_with_time, date_i18n( $date_format, $start ), date_i18n( $time_format, $start ) );
847
848
		// single day, timed
849
		if ( $single_day && ! $all_day && false !== $end )
@@ 855-860 (lines=6) @@
852
		// multi-day
853
		if ( ! $single_day ) {
854
855
			if ( $all_day ) {
856
				// DTEND for multi-day events represents "until", not "including", so subtract one minute
857
				$end_date = date_i18n( $date_format, $end - 60 );
858
			} else {
859
				$end_date = sprintf( $date_with_time, date_i18n( $date_format, $end ), date_i18n( $time_format, $end ) );
860
			}
861
862
			$date = sprintf( $two_dates, $date, $end_date );
863