Code Duplication    Length = 3-4 lines in 2 locations

includes/admin/tools/export/give-export-donations-exporter.php 1 location

@@ 283-286 (lines=4) @@
280
		);
281
		// Date query.
282
		if ( ! empty( $this->start ) || ! empty( $this->end ) ) {
283
			if ( ! empty( $this->start ) ) {
284
				$start_date                         = give_get_formatted_date( $this->start );
285
				$defaults['date_query'][0]['after'] = "{$start_date} 00:00:00";
286
			}
287
			if ( ! empty( $this->end ) ) {
288
				$end_date                            = give_get_formatted_date( $this->end );
289
				$defaults['date_query'][0]['before'] = "{$end_date} 23:59:59";

includes/donors/class-give-donors-query.php 1 location

@@ 623-625 (lines=3) @@
620
621
		$date_query = array();
622
623
		if ( ! empty ( $this->args['start_date'] ) ) {
624
			$date_query['after'] = give_get_formatted_date( $this->args['start_date'] );
625
		}
626
627
		if ( ! empty ( $this->args['end_date'] ) ) {
628
			$date_query['before'] = give_get_formatted_date( $this->args['end_date'] ) . ' 23:59:59';