Code Duplication    Length = 9-9 lines in 3 locations

web_interface/astpp/system/helpers/date_helper.php 3 locations

@@ 187-195 (lines=9) @@
184
		$seconds -= $years * 31536000;
185
		$months = floor($seconds / 2628000);
186
187
		if ($years > 0 OR $months > 0)
188
		{
189
			if ($months > 0)
190
			{
191
				$str .= $months.' '.$CI->lang->line((($months > 1) ? 'date_months' : 'date_month')).', ';
192
			}
193
194
			$seconds -= $months * 2628000;
195
		}
196
197
		$weeks = floor($seconds / 604800);
198
@@ 199-207 (lines=9) @@
196
197
		$weeks = floor($seconds / 604800);
198
199
		if ($years > 0 OR $months > 0 OR $weeks > 0)
200
		{
201
			if ($weeks > 0)
202
			{
203
				$str .= $weeks.' '.$CI->lang->line((($weeks > 1) ? 'date_weeks' : 'date_week')).', ';
204
			}
205
206
			$seconds -= $weeks * 604800;
207
		}
208
209
		$days = floor($seconds / 86400);
210
@@ 211-219 (lines=9) @@
208
209
		$days = floor($seconds / 86400);
210
211
		if ($months > 0 OR $weeks > 0 OR $days > 0)
212
		{
213
			if ($days > 0)
214
			{
215
				$str .= $days.' '.$CI->lang->line((($days > 1) ? 'date_days' : 'date_day')).', ';
216
			}
217
218
			$seconds -= $days * 86400;
219
		}
220
221
		$hours = floor($seconds / 3600);
222