Java Year Get getYear(String date)

Here you can find the source of getYear(String date)

Description

Get year

License

Open Source License

Return

year

Declaration

public static int getYear(String date) 

Method Source Code

//package com.java2s;
/*/*  w w  w  .jav  a 2s . c  om*/
 * License information at https://github.com/Caltech-IPAC/firefly/blob/master/License.txt
 */

public class Main {
    /**
     *  Get year
     *  @return year
     */
    public static int getYear(String date) {
        return Integer.parseInt(date.substring(0, 4));
    }
}

Related

  1. getYear(String aDate)
  2. GetYear(String agmipDate)
  3. getYear(String argDate)
  4. getYear(String date)
  5. getYear(String date)
  6. getYear(String date)
  7. getYear(String dateKey)
  8. getYear(String datetime)
  9. getYear(String day)