/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.time.* ;
import java.time.temporal.* ;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
ZoneId z = ZoneId.of( "America/Montreal" ) ;
ZonedDateTime start = ZonedDateTime.of(
LocalDate.of( 2017 , Month.JANUARY , 23 ) ,
LocalTime.parse( "08:00:00" ) ,
z
) ;
ZonedDateTime stop = ZonedDateTime.of(
LocalDate.of( 2017 , Month.JANUARY , 25 ) ,
LocalTime.parse( "13:00:00" ) ,
z
) ;
long hours = ChronoUnit.HOURS.between( start , stop ) ;
System.
out.
println( start
+ "/" + stop
+ " = hours: " + hours
) ;
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgppbXBvcnQgamF2YS50aW1lLiogOwppbXBvcnQgamF2YS50aW1lLnRlbXBvcmFsLiogOwoKLyogTmFtZSBvZiB0aGUgY2xhc3MgaGFzIHRvIGJlICJNYWluIiBvbmx5IGlmIHRoZSBjbGFzcyBpcyBwdWJsaWMuICovCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKClpvbmVJZCB6ID0gWm9uZUlkLm9mKCAiQW1lcmljYS9Nb250cmVhbCIgKSA7Cgpab25lZERhdGVUaW1lIHN0YXJ0ID0gWm9uZWREYXRlVGltZS5vZiggCiAgICBMb2NhbERhdGUub2YoIDIwMTcgLCBNb250aC5KQU5VQVJZICwgMjMgKSAsCiAgICBMb2NhbFRpbWUucGFyc2UoICIwODowMDowMCIgKSAsIAogICAgegopIDsKClpvbmVkRGF0ZVRpbWUgc3RvcCA9IFpvbmVkRGF0ZVRpbWUub2YoIAogICAgTG9jYWxEYXRlLm9mKCAyMDE3ICwgTW9udGguSkFOVUFSWSAsIDI1ICkgLAogICAgTG9jYWxUaW1lLnBhcnNlKCAiMTM6MDA6MDAiICkgLCAKICAgIHoKKSA7Cgpsb25nIGhvdXJzID0gQ2hyb25vVW5pdC5IT1VSUy5iZXR3ZWVuKCBzdGFydCAsIHN0b3AgKSA7CgpTeXN0ZW0ub3V0LnByaW50bG4oIHN0YXJ0ICsgIi8iICsgc3RvcCArICIgPSBob3VyczogIiArIGhvdXJzICkgOwoKCgl9Cn0=