Here you can find the source of getFirstDay4CurrentYear()
public static String getFirstDay4CurrentYear()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getFirstDay4CurrentYear() { SimpleDateFormat df = new SimpleDateFormat("yyyy"); String todayAsString = df.format(new Date()); todayAsString = todayAsString + "-01-01"; return todayAsString; }//w w w.j a va 2 s . c om }