Code example for Date

Methods: getDaygetMonthgetYear

0
     * 
     * @param userDate 
     * @return 
     */ 
    public boolean isSameDay(Date userDate) {
        Date today = new Date();
        return (today.getDay() == userDate.getDay() &&
                today.getMonth() == userDate.getMonth() &&
                today.getYear() == userDate.getYear());
    } 
 
    /** 
     * Checks whether the user should do a short or long break 
     * 
     * @param dbHelper 
     * @return 
     * @throws PomodroidException 
     */ 
    public boolean isLongerBreak(DBHelper dbHelper) throws PomodroidException {
        User user = User.retrieve(dbHelper);
Experience pair programming with AI  Get Codota for Java