@@ -171,4 +171,22 @@ function it_humanizes_precise_difference_between_dates_for_pt_BR_locale()
171
171
$ this ->preciseDifference (new \DateTime ($ example [0 ]), new \DateTime ($ example [1 ]), 'pt_BR ' )->shouldReturn ($ example [2 ]);
172
172
}
173
173
}
174
+
175
+ function it_humanizes_precise_difference_between_dates_for_it_locale ()
176
+ {
177
+ $ examples = array (
178
+ array ("2014-04-26 13:00:00 " , "2014-04-26 12:58:15 " , '1 minuto, 45 secondi fa ' ),
179
+ array ("2014-04-26 13:00:00 " , "2014-04-26 11:20:00 " , '1 ora, 40 minuti fa ' ),
180
+ array ("2014-04-26 13:00:00 " , "2014-04-27 13:15:00 " , '1 giorno, 15 minuti da adesso ' ),
181
+ array ("2014-04-26 13:00:00 " , "2014-05-03 15:00:00 " , '7 giorni, 2 ore da adesso ' ),
182
+ array ("2014-04-26 13:00:00 " , "2015-04-28 17:00:00 " , '1 anno, 2 giorni, 4 ore da adesso ' ),
183
+ array ("2014-04-26 13:00:00 " , "2014-04-28 23:00:00 " , '2 giorni, 10 ore da adesso ' ),
184
+ array ("2014-04-26 13:00:00 " , "2014-04-25 11:20:00 " , '1 giorno, 1 ora, 40 minuti fa ' ),
185
+ array ("2014-04-26 13:00:00 " , "2016-04-27 13:00:00 " , '2 anni, 1 giorno da adesso ' ),
186
+ );
187
+
188
+ foreach ($ examples as $ example ) {
189
+ $ this ->preciseDifference (new \DateTime ($ example [0 ]), new \DateTime ($ example [1 ]), 'it ' )->shouldReturn ($ example [2 ]);
190
+ }
191
+ }
174
192
}
0 commit comments