List of usage examples for java.time.chrono Chronology ofLocale
static Chronology ofLocale(Locale locale)
From source file:org.openlmis.fulfillment.web.util.StatusChangeDto.java
/** * Print createdDate for display purposes. * @return created date/*from w w w . ja v a 2 s.co m*/ */ @JsonIgnore public String printDate() { Locale locale = LocaleContextHolder.getLocale(); String datePattern = DateTimeFormatterBuilder.getLocalizedDateTimePattern(FormatStyle.MEDIUM, FormatStyle.MEDIUM, Chronology.ofLocale(locale), locale); DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(datePattern); return dateTimeFormatter.format(createdDate); }