Java tutorial
import java.time.LocalDate; import java.time.Month; import java.time.format.DateTimeFormatter; public class Main { public static void main(String[] args) { LocalDate ld = LocalDate.of(2014, Month.JANUARY, 1); String pattern = "'New Year in' yyyy 'is on' EEEE"; DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern); String str = ld.format(formatter); System.out.println(str); } }