The Nebula-1 station receives spaceships only on odd days of the standard earth year (i.e. days when there have been an odd number of days since the beginning of the year). Let's find out if we can party on Nebula-1 today. To do this, we'll implement the isDateOdd(String date) method, which returns true if the number of days since the beginning of the year is odd, and otherwise returns false.
Working with dates
- 10
Locked
GregorianCalendar(int,java.lang.String,int)
. Onlyjava.util.GregorianCalendar.GregorianCalendar(int,int,int)
. So I guess I will have to write a little method to transform the Month-Word into the corresponding number... Maybe someone can tell me, why Calendar.MONTH isn't working? Am I needed to import another class? Currently I haveutil.Date; util.Calendar
andutil.GregorianCalendar;
Update: because of the requirement that the Solution class must have two methods, I now have to take everything I have outsorced into my transformMonth method and have to throw it in the isDateOdd method, and everything will be totally incomprehensible