org.apache.chemistry.opencmis.server.support.query
Class CalendarHelper

java.lang.Object
  extended by org.apache.chemistry.opencmis.server.support.query.CalendarHelper

public class CalendarHelper
extends Object

Helper dealing with conversion of Calendar to and from the string format specified by CMISQL.


Method Summary
static GregorianCalendar fromString(String datetime)
          Converts a CMISQL date string representation to a GregorianCalendar.
static String toString(Calendar cal)
          Converts a Calendar to its CMISQL string representation.
static void toString(Calendar cal, StringBuilder buf)
          Converts a Calendar to its CMISQL string representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fromString

public static GregorianCalendar fromString(String datetime)
Converts a CMISQL date string representation to a GregorianCalendar.

Parses YYYY-HH-MMThh:mm:ss.sss+hh:mm, or a Z for the timezone, and with .sss being optional.

Parameters:
datetime - the string representation in CMISQL format
Returns:
the created instance

toString

public static String toString(Calendar cal)
Converts a Calendar to its CMISQL string representation.

Parameters:
cal - a Calendar
Returns:
the CMISQL string representation

toString

public static void toString(Calendar cal,
                            StringBuilder buf)
Converts a Calendar to its CMISQL string representation.

Parameters:
cal - a Calendar
buf - a buffer in which to add the CMISQL string representation


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.