/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.time.* ;
import java.time.format.* ;
import java.time.temporal.* ;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
DateTimeFormatter fmt = DateTimeFormatter.ofPattern("d-M-uuuu" ) ;
LocalDate date1 = LocalDate.parse( "23-6-2018", fmt ) ;
LocalDate date2 = LocalDate.parse( "23-12-2018", fmt ) ;
long days = ChronoUnit.DAYS.between( date1 , date2 ) ;
Period p = Period.between( date1 , date2 ) ;
System.
out.
println( "days: " + days
) ; System.
out.
println( "p.toString(): " + p
) ;
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgppbXBvcnQgamF2YS50aW1lLiogOwppbXBvcnQgamF2YS50aW1lLmZvcm1hdC4qIDsKaW1wb3J0IGphdmEudGltZS50ZW1wb3JhbC4qIDsKCi8qIE5hbWUgb2YgdGhlIGNsYXNzIGhhcyB0byBiZSAiTWFpbiIgb25seSBpZiB0aGUgY2xhc3MgaXMgcHVibGljLiAqLwpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgpEYXRlVGltZUZvcm1hdHRlciBmbXQgPSBEYXRlVGltZUZvcm1hdHRlci5vZlBhdHRlcm4oImQtTS11dXV1IiApIDsKTG9jYWxEYXRlIGRhdGUxID0gTG9jYWxEYXRlLnBhcnNlKCAiMjMtNi0yMDE4IiwgZm10ICkgOwpMb2NhbERhdGUgZGF0ZTIgPSBMb2NhbERhdGUucGFyc2UoICIyMy0xMi0yMDE4IiwgZm10ICkgOwpsb25nIGRheXMgPSBDaHJvbm9Vbml0LkRBWVMuYmV0d2VlbiggZGF0ZTEgLCBkYXRlMiApIDsKUGVyaW9kIHAgPSBQZXJpb2QuYmV0d2VlbiggZGF0ZTEgLCBkYXRlMiApIDsKClN5c3RlbS5vdXQucHJpbnRsbiggImRheXM6ICIgKyBkYXlzICkgOwpTeXN0ZW0ub3V0LnByaW50bG4oICJwLnRvU3RyaW5nKCk6ICIgKyBwICkgOwoKCX0KfQ==