/** * @param aList a list of parameters for this component * @param aValue a value string for this component * @throws ParseException where the specified value string is not a valid date-time/date representation */ public DtStart(final ParameterList aList, final String aValue) throws ParseException { super(DTSTART, aList, new Factory()); setValue(aValue); }
/** * @param aValue a value string for this component * @throws ParseException where the specified value string is not a valid date-time/date representation */ public DtStart(final String aValue) throws ParseException { super(DTSTART, PropertyFactoryImpl.getInstance()); setValue(aValue); }
/** * Creates a new DTSTART property initialised with the specified timezone and value. * * @param value a string representation of a DTSTART value * @param timezone initial timezone * @throws ParseException where the specified value is not a valid string * representation */ public DtStart(String value, TimeZone timezone) throws ParseException { super(DTSTART, timezone, new Factory()); setValue(value); }
/** * @param aList a list of parameters for this component * @param aValue a value string for this component * @throws ParseException where the specified value string is not a valid date-time/date representation */ public DtStart(final ParameterList aList, final String aValue) throws ParseException { super(DTSTART, aList, PropertyFactoryImpl.getInstance()); setValue(aValue); }
/** * @param aValue a value string for this component * @throws ParseException where the specified value string is not a valid date-time/date representation */ public DtStart(final String aValue) throws ParseException { super(DTSTART, new Factory()); setValue(aValue); }
/** * Creates a new DTSTART property initialised with the specified timezone and value. * * @param value a string representation of a DTSTART value * @param timezone initial timezone * @throws ParseException where the specified value is not a valid string * representation */ public DtStart(String value, TimeZone timezone) throws ParseException { super(DTSTART, timezone, new Factory()); setValue(value); }
/** * @param aValue a value string for this component * @throws ParseException where the specified value string is not a valid date-time/date representation */ public DtStart(final String aValue) throws ParseException { super(DTSTART, new Factory()); setValue(aValue); }
/** * @param aValue a value string for this component * @throws ParseException where the specified value string is not a valid date-time/date representation */ public DtStart(final String aValue) throws ParseException { super(DTSTART, PropertyFactoryImpl.getInstance()); setValue(aValue); }
/** * @param aList a list of parameters for this component * @param aValue a value string for this component * @throws ParseException where the specified value string is not a valid date-time/date representation */ public DtStart(final ParameterList aList, final String aValue) throws ParseException { super(DTSTART, aList, PropertyFactoryImpl.getInstance()); setValue(aValue); }
/** * Creates a new DTSTART property initialised with the specified timezone and value. * * @param value a string representation of a DTSTART value * @param timezone initial timezone * @throws ParseException where the specified value is not a valid string * representation */ public DtStart(String value, TimeZone timezone) throws ParseException { super(DTSTART, timezone, PropertyFactoryImpl.getInstance()); setValue(value); }
/** * Creates a new DTSTART property initialised with the specified timezone and value. * * @param value a string representation of a DTSTART value * @param timezone initial timezone * @throws ParseException where the specified value is not a valid string * representation */ public DtStart(String value, TimeZone timezone) throws ParseException { super(DTSTART, timezone, PropertyFactoryImpl.getInstance()); setValue(value); }
/** * @param aList a list of parameters for this component * @param aValue a value string for this component * @throws ParseException where the specified value string is not a valid date-time/date representation */ public DtStart(final ParameterList aList, final String aValue) throws ParseException { super(DTSTART, aList, new Factory()); setValue(aValue); }
/** * Creates a new DTSTART property initialised with the specified timezone and value. * @param value a string representation of a DTSTART value * @param timezone initial timezone * @throws ParseException where the specified value is not a valid string * representation */ public DtStart(String value, TimeZone timezone) throws ParseException { super(DTSTART, timezone, PropertyFactoryImpl.getInstance()); setValue(value); }
/** * @param aValue a value string for this component * @throws ParseException where the specified value string is not a valid date-time/date representation */ public DtStart(final String aValue) throws ParseException { super(DTSTART, PropertyFactoryImpl.getInstance()); setValue(aValue); }
/** * @param aList a list of parameters for this component * @param aValue a value string for this component * @throws ParseException where the specified value string is not a valid date-time/date representation */ public DtStart(final ParameterList aList, final String aValue) throws ParseException { super(DTSTART, aList, PropertyFactoryImpl.getInstance()); setValue(aValue); }
String[] parts = property.split(":"); if (parts.length > 1) { try { String timezone = parts[0].replace("DTSTART;TZID=", ""); DtStart start = new DtStart(); start.getParameters().add(Value.DATE_TIME); start.getParameters().add(new TzId(timezone)); start.setValue(parts[1]); } catch (ParseException e) { e.printStackTrace(); } }
/** * Test non-utc timezone works. */ public void testNonUtcTimezone() throws ParseException { DtStart start = new DtStart(); start.getParameters().add(Value.DATE_TIME); start.getParameters().add(new TzId("GMT")); start.setValue("20070101T080000"); assertEquals("DTSTART;VALUE=DATE-TIME;TZID=GMT:20070101T080000" + Strings.LINE_SEPARATOR, start.toString()); } }
/** * Unit tests for timezone constructor. */ public void testDtStartTimezone() throws ParseException { DtStart dtStart = new DtStart(timezone); dtStart.setValue(new DateTime().toString()); assertEquals(timezone, dtStart.getTimeZone()); // initialising with DATE value should reset timezone.. dtStart.setDate(new Date()); assertNull(dtStart.getTimeZone()); }
dt.setValue(getDtval());