Java Month Day getFirstDate(String base_month)

Here you can find the source of getFirstDate(String base_month)

Description

get First Date

License

Apache License

Parameter

Parameter Description
base_month mm

Declaration

public static String getFirstDate(String base_month) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.ParsePosition;
import java.text.SimpleDateFormat;

public class Main {
    /**/*from   w  ww  .j  a  v  a 2 s . c o m*/
     * 
     * @param base_month mm
     * @return
     */
    public static String getFirstDate(String base_month) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
        ParsePosition pos1 = new ParsePosition(0);
        base_month = base_month + "01";
        java.util.Date FirstDate = sdf.parse(base_month, pos1);
        return String.valueOf(sdf.format(FirstDate));
    }
}

Related

  1. getCurrMonthFirstDay()
  2. getDayOfMonth()
  3. getDaysInMonth(final Date date)
  4. getDaysOfMonth(Date date)
  5. getDaysOfMonth(Date date)
  6. getFirstDateOfCurMonth()
  7. getFirstDateOfMonth(Date theDate)
  8. getFirstday_Month(Date date, int months)
  9. getFirstDayOfCurMonth()