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

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

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

import java.time.temporal.Temporal;

import jfxtras.icalendarfx.components.VEvent;
import jfxtras.icalendarfx.components.VFreeBusy;
import jfxtras.icalendarfx.components.VTodo;
import jfxtras.icalendarfx.properties.PropBaseDateTime;
import jfxtras.icalendarfx.properties.component.time.DateTimeStart;

/**
 * DTSTART
 * Date-Time Start (for local date only)
 * RFC 5545, 3.8.2.4, page 97
 * 
 * This property specifies when the calendar component begins.
 * 
 * Example:
 * DTSTART;VALUE=DATE:20160307
 * 
 * @author David Bal
 *
 * The property can be specified in following components:
 * @see VEvent
 * @see VTodo
 * @see VFreeBusy
 */
public class DateTimeStart extends PropBaseDateTime
{
   public DateTimeStart(Temporal temporal)
    {
        super(temporal);
    }
    
    public DateTimeStart(DateTimeStart source)
    {
        super(source);
    }

    public DateTimeStart()
    {
        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 DateTimeStart parse(String value)
    {
    	return DateTimeStart.parse(new DateTimeStart(), value);
    }
    
    /** Parse string with Temporal class explicitly provided as parameter */
    public static DateTimeStart parse(Class clazz, String value)
    {
        DateTimeStart property = DateTimeStart.parse(new DateTimeStart(), value);
        clazz.cast(property.getValue()); // class check
        return property;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy