Code Duplication    Length = 4-6 lines in 2 locations

_inc/lib/icalendar-reader.php 2 locations

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