示例#1
0
 /// <summary>
 /// initializes fCalendar from parameters. Returns fCalendar as a
 /// convenience.
 /// </summary>
 ///
 /// <param name="zone">Zone to be adopted, or NULL for TimeZone::createDefault().</param>
 /// <param name="locale">Locale of the calendar</param>
 /// <param name="status">Error code</param>
 /// <returns>the newly constructed fCalendar</returns>
 /// @draft ICU 3.8
 private Calendar InitializeCalendar(IBM.ICU.Util.TimeZone zone, ULocale locale)
 {
     if (calendar == null)
     {
         if (zone == null)
         {
             calendar = IBM.ICU.Util.Calendar.GetInstance(locale);
         }
         else
         {
             calendar = IBM.ICU.Util.Calendar.GetInstance(zone, locale);
         }
     }
     return(calendar);
 }
示例#2
0
 /// <summary>
 /// Constructs a <c>JapaneseCalendar</c> based on the current time in
 /// the given time zone with the default locale.
 /// </summary>
 ///
 /// <param name="zone">the given time zone.</param>
 /// @stable ICU 2.8
 public JapaneseCalendar(TimeZone zone) : base(zone)
 {
 }
示例#3
0
 /// <summary>
 /// Constructs a <c>JapaneseCalendar</c> based on the current time in
 /// the given time zone with the given locale.
 /// </summary>
 ///
 /// <param name="zone">the given time zone.</param>
 /// <param name="locale">the given ulocale.</param>
 /// @stable ICU 3.2
 public JapaneseCalendar(TimeZone zone, ULocale locale) : base(zone, locale)
 {
 }
示例#4
0
 /// <summary>
 /// Constructs a <c>JapaneseCalendar</c> based on the current time in
 /// the given time zone with the given locale.
 /// </summary>
 ///
 /// <param name="zone">the given time zone.</param>
 /// <param name="aLocale">the given locale.</param>
 /// @stable ICU 2.8
 public JapaneseCalendar(TimeZone zone, ILOG.J2CsMapping.Util.Locale aLocale)
     : base(zone, aLocale)
 {
 }
示例#5
0
 /// <summary>
 /// Constructs a <c>TaiwanCalendar</c> based on the current time in the
 /// given time zone with the default locale.
 /// </summary>
 ///
 /// <param name="zone">the given time zone.</param>
 /// @draft ICU 3.8
 /// @provisional This API might change or be removed in a future release.
 public TaiwanCalendar(TimeZone zone) : base(zone)
 {
 }
示例#6
0
 /// <summary>
 /// Constructs a <c>TaiwanCalendar</c> based on the current time in the
 /// given time zone with the given locale.
 /// </summary>
 ///
 /// <param name="zone">the given time zone.</param>
 /// <param name="locale">the given ulocale.</param>
 /// @draft ICU 3.8
 /// @provisional This API might change or be removed in a future release.
 public TaiwanCalendar(TimeZone zone, ULocale locale) : base(zone, locale)
 {
 }
示例#7
0
 /// <summary>
 /// Constructs a <c>TaiwanCalendar</c> based on the current time in the
 /// given time zone with the given locale.
 /// </summary>
 ///
 /// <param name="zone">the given time zone.</param>
 /// @draft ICU 3.8
 /// @provisional This API might change or be removed in a future release.
 public TaiwanCalendar(TimeZone zone, ILOG.J2CsMapping.Util.Locale aLocale)
     : base(zone, aLocale)
 {
 }
示例#8
0
 /// <summary>
 /// Constructs a <c>IndianCalendar</c> based on the current time in the
 /// given time zone with the given locale.
 /// </summary>
 ///
 /// <param name="zone">the given time zone.</param>
 /// <param name="locale">the given ulocale.</param>
 /// @draft ICU 3.8
 /// @provisional This API might change or be removed in a future release.
 public IndianCalendar(TimeZone zone, ULocale locale) : base(zone, locale)
 {
     SetTimeInMillis(DateTime.Now.Millisecond);
 }
示例#9
0
 /// <summary>
 /// Constructs a <c>IndianCalendar</c> based on the current time in the
 /// given time zone with the default locale.
 /// </summary>
 ///
 /// <param name="zone">the given time zone.</param>
 /// @draft ICU 3.8
 /// @provisional This API might change or be removed in a future release.
 public IndianCalendar(TimeZone zone) : this(zone, IBM.ICU.Util.ULocale.GetDefault())
 {
 }
示例#10
0
 /// <summary>
 /// TimeZone API; calls through to wrapped time zone.
 /// </summary>
 ///
 public override bool HasSameRules(IBM.ICU.Util.TimeZone other)
 {
     return(other  is  TimeZoneAdapter &&
            zone.HasSameRules(((TimeZoneAdapter)other).zone));
 }
示例#11
0
 /// <summary>
 /// Constructs an adapter for a com.ibm.icu.util.TimeZone object.
 /// </summary>
 ///
 public TimeZoneAdapter(IBM.ICU.Util.TimeZone zone_0)
 {
     this.zone = zone_0;
     base.SetID(zone_0.GetID());
 }
示例#12
0
 /// <summary>
 /// Given a java.util.TimeZone, wrap it in the appropriate adapter subclass
 /// of com.ibm.icu.util.TimeZone and return the adapter.
 /// </summary>
 ///
 public static IBM.ICU.Util.TimeZone Wrap(IBM.ICU.Util.TimeZone tz)
 {
     return(new TimeZoneAdapter(tz));
 }