List of usage examples for java.time MonthDay format
public String format(DateTimeFormatter formatter)
From source file:Main.java
public static void main(String[] args) { MonthDay m = MonthDay.now(); String n = m.format(DateTimeFormatter.ofPattern("M")); System.out.println(n);//from ww w . j av a2s . co m }