Java Month Convert convertMonthFromNumber(int month)

Here you can find the source of convertMonthFromNumber(int month)

Description

convert Month From Number

License

Apache License

Declaration

public static String convertMonthFromNumber(int month) 

Method Source Code

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

public class Main {
    public static String convertMonthFromNumber(int month) {
        if (month < 1) {
            return "01";
        } else if (month >= 1 && month <= 9) {
            return "0" + month;
        } else if (month >= 10 && month <= 12) {
            return "" + month;
        } else {//from ww  w. jav a2  s.  com
            return "12";
        }
    }
}

Related

  1. convertCharMonthToDecimal(String month)
  2. convertDecimalToCharMonth(int month)
  3. convertMonth(String monthSlashYear)
  4. convertMonth(String value)
  5. convertMonthStringToInt(String monthString)
  6. ConvertNumToMonth(int mesEntrada)
  7. convertToAlphaMonth(final int importIntMonth)
  8. convertToMonth_long(int month)