Here you can find the source of yearFromDate(String date)
Parameter | Description |
---|---|
date | date |
public static String yearFromDate(String date)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from ww w. j a v a2 s . c o m*/ * @param date date * @return year from string date */ public static String yearFromDate(String date) { String dt = date.substring(0, 4); return dt; } }