예제 #1
0
 /// <summary>
 /// Sets the Date which is the start of the one hundred year period for two
 /// digits year values.
 /// </summary>
 ///
 /// <param name="date">the Date</param>
 public void Set2DigitYearStart(DateTime date)
 {
     icuFormat.Set2DigitYearStart(date);
     defaultCenturyStart = date;
     IBM.ICU.Util.Calendar cal = new IBM.ICU.Util.GregorianCalendar();
     cal.SetTime(date);
     creationYear = cal.Get(ILOG.J2CsMapping.Util.Calendar.YEAR);
 }
예제 #2
0
 private SimpleDateFormat(Locale locale)
 {
     numberFormat = NumberFormat.GetInstance(locale);
     numberFormat.SetParseIntegerOnly(true);
     numberFormat.SetGroupingUsed(false);
     calendar = new IBM.ICU.Util.GregorianCalendar(locale);
     calendar.Add(ILOG.J2CsMapping.Util.Calendar.YEAR, -80);
     creationYear        = calendar.Get(ILOG.J2CsMapping.Util.Calendar.YEAR);
     defaultCenturyStart = calendar.GetTime();
 }