Java Month Get getSelectMonth(String month)

Here you can find the source of getSelectMonth(String month)

Description

get Select Month

License

Open Source License

Parameter

Parameter Description
month a parameter

Declaration

public static Date getSelectMonth(String month) 

Method Source Code

//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;
    }
}

Related

  1. getMonthString(int month)
  2. getMonthStringFromNumber(String monthNumber)
  3. getMonthStrings()
  4. getNearbyMonth(String month, int i)
  5. getReportMonthString()
  6. getShortMonthForInt(final Locale locale, int theMonth)
  7. getSpecficMonthStart(Date date, int amount)
  8. getStartDateOfMonth(String yyyymm)
  9. getStrOfNextMonth(String dateStr)