1 6 package com.ibm.icu.text; 7 8 import com.ibm.icu.impl.CalendarData; 9 import com.ibm.icu.util.*; 10 import java.util.Locale ; 11 12 22 public class ChineseDateFormatSymbols extends DateFormatSymbols { 23 static final long serialVersionUID = 6827816119783952890L; 25 26 30 String isLeapMonth[]; 32 36 public ChineseDateFormatSymbols() { 37 this(ULocale.getDefault()); 38 } 39 40 45 public ChineseDateFormatSymbols(Locale locale) { 46 super(ChineseCalendar.class, ULocale.forLocale(locale)); 47 } 48 49 55 public ChineseDateFormatSymbols(ULocale locale) { 56 super(ChineseCalendar.class, locale); 57 } 58 59 65 public ChineseDateFormatSymbols(Calendar cal, Locale locale) { 66 super(cal==null?null:cal.getClass(), locale); 67 } 68 69 76 public ChineseDateFormatSymbols(Calendar cal, ULocale locale) { 77 super(cal == null ? null : cal.getClass(), locale); 78 } 79 80 84 public String getLeapMonth(int isLeapMonth) { 85 return this.isLeapMonth[isLeapMonth]; 86 } 87 88 91 protected void initializeData(ULocale loc, CalendarData calData) { 92 super.initializeData(loc, calData); 93 isLeapMonth = calData.getStringArray("isLeapMonth"); 94 } 95 96 void initializeData(DateFormatSymbols dfs) { 97 super.initializeData(dfs); 98 if (dfs instanceof ChineseDateFormatSymbols) { 99 this.isLeapMonth = ((ChineseDateFormatSymbols)dfs).isLeapMonth; 100 } 101 } 102 } 103 | Popular Tags |