Here you can find the source of YearToString(int year)
public static String YearToString(int year)
//package com.java2s; //License from project: Open Source License public class Main { public static String YearToString(int year) { if (year <= 0) { year *= -1;// w ww . j av a 2 s . co m year++; return String.format("%dBC", year); } return Integer.toString(year); } }