Java Year Month getYearMonthDay()

Here you can find the source of getYearMonthDay()

Description

get Year Month Day

License

Open Source License

Declaration

public static String getYearMonthDay() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;
import java.util.Date;

public class Main {
    private static final Calendar CALENDAR = Calendar.getInstance();

    public static String getYearMonthDay() {
        CALENDAR.setTime(new Date());
        int year = CALENDAR.get(Calendar.YEAR);
        int month = CALENDAR.get(Calendar.MONTH) + 1;
        return year + "" + month;
    }/* w w w .j  a v a2 s  . c om*/
}

Related

  1. getYearMonth(Date date)
  2. getYearMonth(String dateString)
  3. getYearMonth(String year)
  4. getYearMonthDate()
  5. getYearMonthDateByMisSecond(long misSecond)
  6. getYearMonthDay(Date date)
  7. getYearMonthDay(final int year, final int month, final int day)
  8. getYearMonthList(int year)
  9. getYearMonths(List time)