|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.servlets.post.impl.helper.DateParser
public class DateParser
Takes a string representation of a time-date string and tries for parse it using different formats.
Constructor Summary | |
---|---|
DateParser()
|
Method Summary | |
---|---|
Calendar |
parse(String source)
Parses the given source string and returns the respective calendar instance. |
Calendar[] |
parse(String[] sources)
Parses the given source strings and returns the respective calendar instances. |
javax.jcr.Value[] |
parse(String[] sources,
javax.jcr.ValueFactory factory)
Parses the given source strings and returns the respective jcr date value instances. |
void |
register(String format)
Registers a format string to the list of internally checked ones. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DateParser()
Method Detail |
---|
public void register(String format)
SimpleDateFormat
.
format
- format as in SimpleDateFormat
IllegalArgumentException
- if the format is not valid.public Calendar parse(String source)
null
.
Note: method is synchronized because SimpleDateFormat is not.
source
- date time source string
null
public Calendar[] parse(String[] sources)
null
.
Note: method is synchronized because SimpleDateFormat is not.
sources
- date time source strings
null
public javax.jcr.Value[] parse(String[] sources, javax.jcr.ValueFactory factory)
null
.
Note: method is synchronized because SimpleDateFormat is not.
sources
- date time source stringsfactory
- the value factory
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |