Here you can find the source of getFirstDate(String base_month)
Parameter | Description |
---|---|
base_month | mm |
public static String getFirstDate(String base_month)
//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)); } }