Android examples for java.util:Month
get Days In Gregorian Month
//package com.java2s; public class Main { private int gregorianYear; private int gregorianMonth; private int gregorianDate; private boolean isGregorianLeap; private int dayOfYear; private int dayOfWeek; private int chineseYear; private int chineseMonth; private int chineseDate; private int sectionalTerm; private int principleTerm; private static char[] daysInGregorianMonth = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };//from ww w . j ava2s. c o m public static char[] getDaysInGregorianMonth() { return daysInGregorianMonth; } public String toString() { StringBuffer buf = new StringBuffer(); buf.append("Gregorian Year: " + gregorianYear + "\n"); buf.append("Gregorian Month: " + gregorianMonth + "\n"); buf.append("Gregorian Date: " + gregorianDate + "\n"); buf.append("Is Leap Year: " + isGregorianLeap + "\n"); buf.append("Day of Year: " + dayOfYear + "\n"); buf.append("Day of Week: " + dayOfWeek + "\n"); buf.append("Chinese Year: " + chineseYear + "\n"); buf.append("Heavenly Stem: " + ((chineseYear - 1) % 10) + "\n"); buf.append("Earthly Branch: " + ((chineseYear - 1) % 12) + "\n"); buf.append("Chinese Month: " + chineseMonth + "\n"); buf.append("Chinese Date: " + chineseDate + "\n"); buf.append("Sectional Term: " + sectionalTerm + "\n"); buf.append("Principle Term: " + principleTerm + "\n"); return buf.toString(); } }