Code example for Date

Methods: setHourssetMinutessetSeconds

0
    /** 
     * @return <code>Date</code> based on hidden date. Time is set to 00:00:00. 
     */ 
    protected Date parseDate() {
        try { 
            final Date eventDate = new Date(Long.parseLong(getHiddenDate()));
            eventDate.setHours(0);
            eventDate.setMinutes(0);
            eventDate.setSeconds(0);
 
            return eventDate;
        } catch (NumberFormatException e) {
            // cannot happen normally, but static code analysis does not know 
        } 
        return null; 
    } 
 
    /** 
     * @return description string with images removed and personal note included 
     */ 
Experience pair programming with AI  Get Codota for Java