Java Year From getYearFormat(String dateString)

Here you can find the source of getYearFormat(String dateString)

Description

get Year Format

License

Open Source License

Declaration

public static String getYearFormat(String dateString) 

Method Source Code

//package com.java2s;
/***********************************************************************
 * Copyright (c) 2015 by Regents of the University of Minnesota.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Apache License, Version 2.0 which 
 * accompanies this distribution and is available at
 * http://www.opensource.org/licenses/apache2.0.php.
 *
 *************************************************************************/

public class Main {
    public static String getYearFormat(String dateString) {
        int start = 0;
        int to = dateString.indexOf(".");
        return dateString.substring(start, to);
    }//www  .  j  a  va  2  s  .  c  o  m
}

Related

  1. getYear(boolean fourDigit)
  2. getYear(int num)
  3. getYear(long t)
  4. getYearBegin(int year)
  5. getYearFirst(int year)
  6. getYearFromDay(int days)
  7. getYearFromISODate(String isoDate)
  8. getYearFromTimestamp(long ms)
  9. getYearFromWeekCode(String weekCode)