List of usage examples for org.joda.time.format DateTimeFormatter DateTimeFormatter
DateTimeFormatter(InternalPrinter printer, InternalParser parser)
From source file:io.smalldata.ohmageomh.surveys.domain.ISOW3CDateTimeFormat.java
License:Apache License
/** * Returns a formatter that combines all ISOW3CDateTimeFormats. This * formatter will correctly parse any of the other formatters and will only * fail if the value doesn't match any of them. * //from w ww .ja va 2s. c o m * @return A universal DateTimeFormatter for all ISO W3C date-time formats. * * @see #year() * @see #yearMonth() * @see #yearMonthDay() * @see #dateHourMinuteZone() * @see #dateHourMinuteSecondZone() * @see #dateHourMinuteSecondMillisZone() */ public static DateTimeFormatter any() { if (any == null) { any = new DateTimeFormatter(ISODateTimeFormat.dateTime().getPrinter(), new ISOW3CDateTimeParser()) .withOffsetParsed(); } return any; }
From source file:org.whole.lang.xsd.parsers.SchemaDataTypeParsers.java
License:Open Source License
public static DateTimeFormatter timeFormatter() { if (time == null) { time = new DateTimeFormatter(timePrinter(), timeParser()).withZone(DateTimeZone.UTC); }// w w w . j ava2 s. c om return time; }
From source file:org.whole.lang.xsd.parsers.SchemaDataTypeParsers.java
License:Open Source License
public static DateTimeFormatter dateTimeFormatter() { if (dateTime == null) { dateTime = new DateTimeFormatter(dateTimePrinter(), dateTimeParser()).withZone(DateTimeZone.UTC); }/*from w ww. j a v a 2 s.c o m*/ return dateTime; }
From source file:org.whole.lang.xsd.parsers.SchemaDataTypeParsers.java
License:Open Source License
public static DateTimeFormatter dateFormatter() { if (date == null) { date = new DateTimeFormatter(datePrinter(), dateParser()).withZone(DateTimeZone.UTC); }//from w ww .j a va 2 s .com return date; }
From source file:org.whole.lang.xsd.parsers.SchemaDataTypeParsers.java
License:Open Source License
public static DateTimeFormatter yearMonthFormatter() { if (yearMonth == null) yearMonth = new DateTimeFormatter(yearMonthPrinter(), yearMonthParser()); return yearMonth; }
From source file:org.whole.lang.xsd.parsers.SchemaDataTypeParsers.java
License:Open Source License
public static DateTimeFormatter yearFormatter() { if (year == null) year = new DateTimeFormatter(yearPrinter(), yearParser()).withOffsetParsed(); return year;/*from w w w . j a v a2s . c om*/ }
From source file:org.whole.lang.xsd.parsers.SchemaDataTypeParsers.java
License:Open Source License
public static DateTimeFormatter monthDayFormatter() { if (monthDay == null) monthDay = new DateTimeFormatter(monthDayPrinter(), monthDayParser()); return monthDay; }
From source file:org.whole.lang.xsd.parsers.SchemaDataTypeParsers.java
License:Open Source License
public static DateTimeFormatter monthFormatter() { if (month == null) month = new DateTimeFormatter(monthPrinter(), monthParser()); return month; }
From source file:org.whole.lang.xsd.parsers.SchemaDataTypeParsers.java
License:Open Source License
public static DateTimeFormatter dayFormatter() { if (day == null) day = new DateTimeFormatter(dayPrinter(), dayParser()); return day;/*from w w w.j a v a 2 s .c o m*/ }