Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 473 Bytes

File metadata and controls

10 lines (7 loc) · 473 Bytes

Find the difference of two given dates (in days) represented as Strings using ONLY " GregorianCalendar " utility.

No additional libraries needed. No additional parses needed. Just splitted the strings and separeted days, months and years.

INPUT : 2 dates looking like : dd-MM-yyyy. OUTPUT : How many days these dates differ.

For example : INPUT : String date1 = "1/1/2016" , String date2 = "1/1/2017". OUTPUT : Total days difference between 1-1-2016 and 1-1-2017 : 366.