Package org.joda.time

Examples of org.joda.time.DateTime.toCalendar()


   */
  public static ListState getListState(String url, int dayOfMonth, int docId,
      String primaryKey, WebState webState) throws SharepointException {
    DateTime dt = new DateTime(2009, 9, dayOfMonth, 11, 26, 38, 100);
    ListState ls = new ListState(primaryKey, "inTitle",
        SPConstants.GENERIC_LIST, dt.toCalendar(Locale.ENGLISH), "", url,
        webState);

    ls.setPrimaryKey(primaryKey);
    ls.setType(SPConstants.GENERIC_LIST);
    SPDocument doc = new SPDocument(new Integer(docId).toString(), "X",
View Full Code Here


        this.valueConstraints = valuesFrom(json, "jcr:valueConstraints");
    }

    protected static Calendar parseDate( String dateString ) throws IllegalArgumentException {
        DateTime result = new DateTime(dateString);
        return result.toCalendar(null);
    }

    protected Id id() {
        return id;
    }
View Full Code Here

                DateTime result = new DateTime(value);
                DateTimeZone utc = DateTimeZone.forID("UTC");
                if (!result.getZone().equals(utc)) {
                    result = result.withZone(utc);
                }
                return result.toCalendar(null);
            } catch (IllegalArgumentException e) {
                String from = PropertyType.nameFromValue(getType());
                String to = PropertyType.nameFromValue(PropertyType.LONG);
                throw new ValueFormatException(JdbcI18n.unableToConvertValue.text(value, from, to), e);
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.