LocalDate getEra()
gets the era applicable at this date.
getEra
has the following syntax.
public Era getEra()
The following example shows how to use getEra
.
import java.time.LocalDate; public class Main { public static void main(String[] args) { LocalDate a = LocalDate.of(2014, 6, 30); System.out.println(a.getEra().getValue()); } }
The code above generates the following result.