package solution;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Solution {
    public static void main(String[] args) throws ParseException {
        DateFormat df = new SimpleDateFormat("MMMM dd yyyy");
        String data = df.format(new Date());
      System.out.println(data + " " + "=" + "" + " " + isDateOdd(""));
    }

    public static boolean isDateOdd(String date) {

      Date yearStartTime = new Date();
    yearStartTime.setHours(0);
    yearStartTime.setMinutes(0);
    yearStartTime.setSeconds(0);

    yearStartTime.setDate(1);      // первое число
    yearStartTime.setMonth(0);     // месяц январь, нумерация для месяцев 0-11

    Date currentTime = new Date();
    long msTimeDistance = currentTime.getTime() - yearStartTime.getTime();
    long msDay = 24 * 60 * 60 * 1000;  //сколько миллисекунд в одних сутках


    int x = (int) (msTimeDistance/msDay); //количество целых дней

       if (((x - 1) % 2)== 0){
        return false;
    }
    else { return true; }

}
    }