Java examples for java.time:Format
formatted LocalDate as dd/MM/yyyy
//package com.java2s; import java.time.LocalDate; import java.time.format.DateTimeFormatter; public class Main { public final static DateTimeFormatter DATE_FORMATTER = DateTimeFormatter .ofPattern("dd/MM/yyyy"); public static String formattedDate(LocalDate date) { if (date == null) return "TBA"; return DATE_FORMATTER.format(date); }/*from w w w.ja va 2s. c o m*/ }