Java Year Get getYear(String str_date)

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

Description

get Year

License

Open Source License

Declaration

public static String getYear(String str_date) 

Method Source Code

//package com.java2s;
/**/*from   ww  w  . j  a v a  2 s.c  om*/
 * Copyright (C) 2002-2005 WUZEWEN. All rights reserved.
 * WUZEWEN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

public class Main {

    public static String getYear(String str_date) {
        return getYear(str_date, "-");
    }

    public static String getYear(String str_date, String sep) {
        return str_date.substring(0, str_date.indexOf(sep));
    }
}

Related

  1. getYear(String datetime)
  2. getYear(String day)
  3. getYear(String index)
  4. getYear(String referralId)
  5. getYear(String startTime)
  6. getYear(String strDate)
  7. getYear(String strDate)
  8. getYear(String string)
  9. getYear(String tempdat, Locale locale)