Exemple #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);
 }
Exemple #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)
 {
 }
Exemple #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)
 {
 }
Exemple #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)
 {
 }
Exemple #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)
 {
 }
Exemple #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)
 {
 }
Exemple #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)
 {
 }
Exemple #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);
 }
Exemple #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())
 {
 }
Exemple #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));
 }
Exemple #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());
 }
Exemple #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));
 }