====== LocalTime ====== * https://docs.oracle.com/javase/8/docs/api/java/time/LocalTime.html * https://docs.oracle.com/javase/tutorial/i18n/format/dateFormat.html * https://blog.danlew.net/2013/06/27/how_to_correctly_format_date_time_strings_on_android/ * https://gist.github.com/MizzleDK/65dafdc6f2e2857aad22 ===== until ===== import java.time.LocalTime; import java.time.temporal.ChronoUnit; /** * * @author bogusz.thierry */ public class JavaApplication1 { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here LocalTime h1 = LocalTime.parse("10:45"); LocalTime h2 = LocalTime.parse("12:50"); long m1 = h1.until(h2,ChronoUnit.MINUTES); long m2 = ChronoUnit.MINUTES.between(h1,h2); System.out.println(m1 + ":" + m2); // même résultat ! } } * https://docs.oracle.com/javase/8/docs/api/java/time/temporal/ChronoUnit.html * https://docs.oracle.com/javase/8/docs/api/java/time/LocalTime.html * http://www.java2s.com/Tutorials/Java/java.time/LocalTime/index.htm Mais aussi : https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html