Code Duplication    Length = 25-26 lines in 2 locations

locales/canada-fr.php 1 location

@@ 57-82 (lines=26) @@
54
$start          = (int)date('Y') - 10;
55
$end            = $start + 30;
56
57
for ($y = $start; $y < $end; ++$y) {
58
    easter($y, $this->holidays);
59
    $v = ((int)date('N', strtotime("$y-5-25")) == 1) ? '25' : date('j', strtotime('Last Monday', strtotime("$y-5-25")));
60
    $m = date('j', strtotime('+2 Sunday', strtotime("$y-5-1")));
61
    $f = date('j', strtotime('+3 Sunday', strtotime("$y-6-1")));
62
    $c = date('j', strtotime('+1 Monday', strtotime("$y-8-1")));
63
    $l = date('j', strtotime('+1 Monday', strtotime("$y-9-1")));
64
    $t = date('j', strtotime('+2 Monday', strtotime("$y-10-1")));
65
66
    $this->holidays["$y-1-1"]   = 'Jour de l\'an';
67
    $this->holidays["$y-2-14"]  = 'St-Valentin';
68
    $this->holidays["$y-3-17"]  = 'St-Patrick';
69
    $this->holidays["$y-4-22"]  = 'Jour de la terre';
70
    $this->holidays["$y-5-$m"]  = 'F&ecirc;te des m&egrave;re';
71
    $this->holidays["$y-5-$v"]  = 'F&ecirc;te de la reine';
72
    $this->holidays["$y-6-$f"]  = 'F&ecirc;te des p&egrave;re';
73
    $this->holidays["$y-6-24"]  = 'St-Jean-Baptiste';
74
    $this->holidays["$y-7-1"]   = 'F&ecirc;te du Canada';
75
    $this->holidays["$y-8-$c"]  = 'Cong&eacute; provincial';
76
    $this->holidays["$y-9-$l"]  = 'F&ecirc;te du travail';
77
    $this->holidays["$y-10-$t"] = 'Action de gr&acirc;ce';
78
    $this->holidays["$y-10-31"] = 'Halloween';
79
    $this->holidays["$y-11-11"] = 'Jour du souvenir';
80
    $this->holidays["$y-12-25"] = 'No&euml;l';
81
    $this->holidays["$y-12-26"] = 'Boxing Day';
82
}
83

locales/canada.php 1 location

@@ 57-81 (lines=25) @@
54
$start          = (int)date('Y') - 10;
55
$end            = $start + 30;
56
57
for ($y = $start; $y < $end; ++$y) {
58
    easter($y, $this->holidays);
59
    $v = ((int)date('N', strtotime("$y-5-25")) == 1) ? '25' : date('j', strtotime('Last Monday', strtotime("$y-5-25")));
60
    $m = date('j', strtotime('+2 Sunday', strtotime("$y-5-1")));
61
    $f = date('j', strtotime('+3 Sunday', strtotime("$y-6-1")));
62
    $c = date('j', strtotime('+1 Monday', strtotime("$y-8-1")));
63
    $l = date('j', strtotime('+1 Monday', strtotime("$y-9-1")));
64
    $t = date('j', strtotime('+2 Monday', strtotime("$y-10-1")));
65
66
    $this->holidays["$y-1-1"]   = 'New Years Day';
67
    $this->holidays["$y-2-14"]  = 'Valentine\'s Day';
68
    $this->holidays["$y-3-17"]  = 'St. Patrick\'s Day';
69
    $this->holidays["$y-4-22"]  = 'Earth Day';
70
    $this->holidays["$y-5-$m"]  = 'Mother\'s Day';
71
    $this->holidays["$y-5-$v"]  = 'Victoria Day';
72
    $this->holidays["$y-6-$f"]  = 'Father\'s Day';
73
    $this->holidays["$y-7-1"]   = 'Canada Day';
74
    $this->holidays["$y-8-$c"]  = 'Civic Holiday';
75
    $this->holidays["$y-9-$l"]  = 'Labour Day';
76
    $this->holidays["$y-10-$t"] = 'Thanksgiving';
77
    $this->holidays["$y-10-31"] = 'Halloween';
78
    $this->holidays["$y-11-11"] = 'Rememberance Day';
79
    $this->holidays["$y-12-25"] = 'Christmas Day';
80
    $this->holidays["$y-12-26"] = 'Boxing Day';
81
}
82