/** * Build a JodaDateTimeAdapter * * @param parser Must be a DateTimeFormatter that is capable of parsing * @param printer Must be a DateTimeFormatter that is capable of printing */ public JodaDateTimeAdapter(DateTimeParser parser, DateTimePrinter printer) { if (null == parser || null == printer) { throw new IllegalArgumentException("Parser and printer may not be null"); } this.parser = new DateTimeFormatterBuilder().append(parser).toFormatter(); this.printer = new DateTimeFormatterBuilder().append(printer).toFormatter(); }
/** * Creates a new formatter, however you will normally use the factory * or the builder. * * @param printer the internal printer, null if cannot print * @param parser the internal parser, null if cannot parse */ public PointInTimeFormatter(DateTimePrinter printer, DateTimeParser parser) { super(printer, parser); }