Что не так...убил часа 4ре, все проверял уже по каждой строчке через System.out.println Все равно не проходит валидацию.
package com.javarush.task.task08.task0827;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.Locale;
/*
Работа с датой
*/
public class Solution {
public static void main(String[] args){
System.out.println(isDateOdd("JANUARY 2 2020"));
}
public static boolean isDateOdd(String date){
Date newDate = new Date(date);
Date yearStartTime = new Date();
yearStartTime.setDate(1); // первое число
yearStartTime.setMonth(0);
long finishtime = newDate.getTime()-yearStartTime.getTime();
long day = finishtime/(1000*3600*24);
if (day%2==0)
return false;
else return true;
}
}