Java Year to String YearToString(int year)

Here you can find the source of YearToString(int year)

Description

Year To String

License

Open Source License

Declaration

public static String YearToString(int year) 

Method Source Code

//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);
    }
}

Related

  1. yearToString(int year)