Java Year Get currentYear()

Here you can find the source of currentYear()

Description

current Year

License

Open Source License

Declaration

public static Integer currentYear() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    private final static SimpleDateFormat yyyy = new SimpleDateFormat(
            "yyyy");

    public static Integer currentYear() {
        return Integer.parseInt(yyyy.format(new Date()));
    }/*from w  w w  . j ava 2  s . c o  m*/
}

Related

  1. calcDifferenceAsYears(Calendar aBaseDate, Calendar aTargetDate)
  2. currentYear()
  3. currentYearStr()
  4. getBeforeYear()
  5. getBeginningOfYear()