All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jfxtras.icalendarfx.properties.component.time.DateTimeDue Maven / Gradle / Ivy

The newest version!
package jfxtras.icalendarfx.properties.component.time;

import java.time.temporal.Temporal;

import jfxtras.icalendarfx.components.VTodo;
import jfxtras.icalendarfx.properties.PropBaseDateTime;
import jfxtras.icalendarfx.properties.component.time.DateTimeDue;

/**
 * DUE
 * Date-Time Due (for local-date)
 * RFC 5545, 3.8.2.3, page 96
 * 
 * This property defines the date and time that a to-do is expected to be completed.
 * 
 * The value type of this property MUST be the same as the "DTSTART" property, and
 * its value MUST be later in time than the value of the "DTSTART" property.
 * 
 * Example:
 * DUE;VALUE=DATE:19980704
 * 
 * @author David Bal
 *
 * The property can be specified in following components:
 * @see VTodo
 */
public class DateTimeDue extends PropBaseDateTime
{    
   public DateTimeDue(Temporal temporal)
    {
        super(temporal);
    }
    
    public DateTimeDue(DateTimeDue source)
    {
        super(source);
    }
    
    public DateTimeDue()
    {
        super();
    }

    /** Parse string to Temporal.  Not type safe.  Implementation must
     * ensure parameterized type is the same as date-time represented by String parameter */
    public static DateTimeDue parse(String value)
    {
    	return DateTimeDue.parse(new DateTimeDue(), value);
    }
    
    /** Parse string with Temporal class explicitly provided as parameter */
    public static DateTimeDue parse(Class clazz, String value)
    {
        DateTimeDue property = DateTimeDue.parse(new DateTimeDue(), value);
        clazz.cast(property.getValue()); // class check
        return property;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy