For a Java program, I need a Timeperiod from 2 Dates but i get Errors with the Period.Class.
I tried to get the TimePeriod with Period.between
Calendar myCalendar = new GregorianCalendar(2017, Calendar.JANUARY,1);
Calendar myPeriod = new GregorianCalendar(2017, Calendar.MARCH, 1);
Period prd = Period.between(myCalendar, myPeriod);
return prd.getTime();
I used to return myCalendar.getTime();
Now I need the "Period" of myCalendar
and myPeriod
.
Thank you.