Here you can find the source of normalizedYear(LocalDate d)
private static String normalizedYear(LocalDate d)
//package com.java2s; //License from project: Apache License import java.time.LocalDate; public class Main { /** @return the year this work was published. May be null */ private static String normalizedYear(LocalDate d) { if (d == null) return null; // correct for year-dates that were offset due to UTC conversion to Dec 31st. // HACK: should be pushed closer to data source and/or removed once data is updated int yr = d.getYear(); int mo = d.getMonthValue(); int day = d.getDayOfMonth(); if (mo == 12 && day == 31) { yr++; // assume that what was meant as just a year }/*ww w . java2s. c om*/ return String.valueOf(yr); } }