Java Month Day getStringOfFirstDayInMonth()

Here you can find the source of getStringOfFirstDayInMonth()

Description

get String Of First Day In Month

License

Apache License

Declaration

public static String getStringOfFirstDayInMonth() 

Method Source Code

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

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {

    public static String getStringOfFirstDayInMonth() {
        Date date = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
        String temp = sdf.format(date);
        String firstDayInMoth = "";
        firstDayInMoth = temp + "-01";

        return firstDayInMoth;

    }//  w  ww .j  a v  a2s  .  c  om
}

Related

  1. getMonthMaxDay(String sDate)
  2. getMonthWeek(String curday)
  3. getMonthWeek(String curday)
  4. getPreviosMonthFirstDay()
  5. getShortFirstDayOfMonth()
  6. getStringOfFirstDayInMonth()
  7. isFirstDayOfMonth()
  8. isLastDayOfMonth()
  9. isLastDayOfMonth(Calendar cal)