Java Year Month getFirstYearMonth()

Here you can find the source of getFirstYearMonth()

Description

get First Year Month

License

Apache License

Declaration

public static String getFirstYearMonth() 

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 getFirstYearMonth() {
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-01-1");
        Date curDate = new Date(System.currentTimeMillis());
        return formatter.format(curDate);
    }/*from ww w .j  a  v  a 2  s  . co m*/
}

Related

  1. getFirstDay(String yearMonthStr, int range)
  2. getFirstDayByMonthWeek(int year, int month, int week)
  3. getFirstDayOfMonth(int year, int month)
  4. getFirstDayOfMonth(int year, int month, Integer day)
  5. getFirstTimeOfDay(int year, int month, int day)
  6. getMonthDays(Integer year, Integer month)
  7. getMonthDays(Integer year, Integer month)
  8. getPerMonthByCuttentYear()
  9. getQuarterToYearMonthDay(Integer year, Integer quarter)