0

How to create gregorian calender without using java. Util. gregoriancalender

How to add or subtract dates and time eithout java. util. gregoriancalender

28th Jun 2017, 6:45 PM
krishna
krishna - avatar
3 Respostas
0
can i ask why is it a requirement not to use that class? you want to create your own calendar class? or is it something to do with a complications using GregorianCalendar class?
29th Jun 2017, 5:18 PM
Pablo De Laforé
Pablo De Laforé - avatar
0
Actually my teacher has said
29th Jun 2017, 5:26 PM
krishna
krishna - avatar
0
I assume you'll have to write your own class. Start by creating the date fields day, month,year maybe hours, minutes, seconds then constructors, make sure you validate the dates before creating them, and the imagination is the limit where you should stop making methods for it, you'll have to write at least one to validate the date, multiple constructors for different formats of dates, setters, getters, maybe a method that calculate days between dates I don't know how much is your knowledge in Java and how much it has to be to satisfy your teacher
29th Jun 2017, 5:41 PM
Pablo De Laforé
Pablo De Laforé - avatar