Example usage for org.joda.time.format ISODateTimeFormat year

List of usage examples for org.joda.time.format ISODateTimeFormat year

Introduction

In this page you can find the example usage for org.joda.time.format ISODateTimeFormat year.

Prototype

public static DateTimeFormatter year() 

Source Link

Document

Returns a formatter for a four digit year.

Usage

From source file:org.whole.lang.xsd.parsers.SchemaDataTypeParsers.java

License:Open Source License

private static DateTimeParser yearParser() {
    if (yp == null) {
        yp = new DateTimeFormatterBuilder().append(ISODateTimeFormat.year())
                .appendOptional(new TimeZoneValidatingParser(timeZoneFormatter().getParser())).toParser();
    }/*from   www  . j  a v  a 2 s. c o  m*/
    return yp;
}

From source file:org.whole.lang.xsd.parsers.SchemaDataTypeParsers.java

License:Open Source License

private static DateTimePrinter yearPrinter() {
    if (yprt == null) {
        yprt = new DateTimeFormatterBuilder().append(ISODateTimeFormat.year()).append(timeZoneFormatter())
                .toPrinter();//from w  ww. ja  v  a2  s.  co  m
    }
    return yprt;
}