Java Date Time Java Java API
java.time.ZonedDateTime
public Month getMonth()
Returns a Month enum instance, corresponding to the month-of-year field of this ZonedDateTime instance.
package com.logicbig.example.zoneddatetime;import java.time.Month;import java.time.ZonedDateTime;public class GetMonthExample { public static void main(String... args) { ZonedDateTime d = ZonedDateTime.now(); Month month = d.getMonth(); System.out.println(month); }}
MAY