Java tutorial
//package com.java2s; import android.util.Log; public class Main { public static int convertMonthToDigit(String month) { month = month.toUpperCase(); if (month.equals("JAN")) { return 0; } else if (month.equals("FEB")) { return 1; } else if (month.equals("MAR")) { return 2; } else if (month.equals("APR")) { return 3; } else if (month.equals("MAY")) { return 4; } else if (month.equals("JUN")) { return 5; } else if (month.equals("JUL")) { return 6; } else if (month.equals("AUG")) { return 7; } else if (month.equals("SEP")) { return 8; } else if (month.equals("OCT")) { return 9; } else if (month.equals("NOV")) { return 10; } else if (month.equals("DEC")) { return 11; } else { Log.d("ConvertUtil", "convertMonthToDigit = wasnt passed proper stuff"); return 0; } } }