List of usage examples for org.joda.time.format DateTimeFormatter withDefaultYear
public DateTimeFormatter withDefaultYear(int defaultYear)
From source file:com.tuplejump.stargate.FormatDateTimeFormatter.java
License:Apache License
public FormatDateTimeFormatter(String format, DateTimeFormatter parser, DateTimeFormatter printer, Locale locale) {/* ww w.j av a 2 s .c om*/ this.format = format; this.locale = locale; this.printer = locale == null ? printer.withDefaultYear(1970) : printer.withLocale(locale).withDefaultYear(1970); this.parser = locale == null ? parser.withDefaultYear(1970) : parser.withLocale(locale).withDefaultYear(1970); }