GranularityType(GranularityType granularityType, String period) { this( granularityType.getHiveFormat(), granularityType.getLowerDefaultFormat(), granularityType.getDefaultFormat(), granularityType.dateValuePositions, period ); }
@Override public DateTimeFormatter getFormatter(Formatter type) { GranularityType granularityType = GranularityType.fromPeriod(period); switch (type) { case DEFAULT: return DateTimeFormat.forPattern(granularityType.getDefaultFormat()); case HIVE: return DateTimeFormat.forPattern(granularityType.getHiveFormat()); case LOWER_DEFAULT: return DateTimeFormat.forPattern(granularityType.getLowerDefaultFormat()); default: throw new IAE("There is no format for type %s", type); } }
GranularityType(GranularityType granularityType, String period) { this( granularityType.getHiveFormat(), granularityType.getLowerDefaultFormat(), granularityType.getDefaultFormat(), granularityType.dateValuePositions, period ); }
@Override public DateTimeFormatter getFormatter(Formatter type) { GranularityType granularityType = GranularityType.fromPeriod(period); switch (type) { case DEFAULT: return DateTimeFormat.forPattern(granularityType.getDefaultFormat()); case HIVE: return DateTimeFormat.forPattern(granularityType.getHiveFormat()); case LOWER_DEFAULT: return DateTimeFormat.forPattern(granularityType.getLowerDefaultFormat()); default: throw new IAE("There is no format for type %s", type); } }