Java Month Get getReportMonthString()

Here you can find the source of getReportMonthString()

Description

get Report Month String

License

Open Source License

Declaration

public static String getReportMonthString() 

Method Source Code


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

import java.text.DateFormatSymbols;
import java.util.Calendar;
import java.util.Locale;

public class Main {
    public static String getReportMonthString() {
        DateFormatSymbols dfs = new DateFormatSymbols(new Locale("ro"));
        String[] months = dfs.getMonths();
        if (Calendar.getInstance().get(Calendar.MONTH) > 0) {
            return months[Calendar.getInstance().get(Calendar.MONTH) - 1];
        } else {/* ww w  .  j  a  v a 2s.  c o m*/
            return months[11];
        }
    }

    public static String getReportMonthString(int month) {
        DateFormatSymbols dfs = new DateFormatSymbols(new Locale("ro"));
        String[] months = dfs.getMonths();
        return months[(month - 1)];
    }
}

Related

  1. getMonthString(Date date)
  2. getMonthString(int month)
  3. getMonthStringFromNumber(String monthNumber)
  4. getMonthStrings()
  5. getNearbyMonth(String month, int i)
  6. getSelectMonth(String month)
  7. getShortMonthForInt(final Locale locale, int theMonth)
  8. getSpecficMonthStart(Date date, int amount)
  9. getStartDateOfMonth(String yyyymm)