Here you can find the source of getSelectMonth(String month)
Parameter | Description |
---|---|
month | a parameter |
public static Date getSelectMonth(String month)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**//ww w. j a va2 s.c om * * @param month * @return */ public static Date getSelectMonth(String month) { SimpleDateFormat sdf; Date time = new Date(); sdf = new SimpleDateFormat("yyyy"); String date = sdf.format(time); date = date + "-" + month + "-01 00:00:00.0"; sdf.applyPattern("yyyy-MM"); Date curDate = null; try { curDate = sdf.parse(date); } catch (ParseException e) { } return curDate; } }