Java tutorial
import java.time.MonthDay; import java.time.format.DateTimeFormatter; public class Main { public static void main(String[] args) { MonthDay m = MonthDay.now(); String n = m.format(DateTimeFormatter.ofPattern("M")); System.out.println(n); } }