Пример #1
0
 /**
  * Constructs a <code>PersianCalendar</code> with the given date set in the default time zone with
  * the default <code>FORMAT</code> locale.
  *
  * @param year the value used to set the {@link #YEAR YEAR} time field in the calendar.
  * @param month the value used to set the {@link #MONTH MONTH} time field in the calendar. Note
  *     that the month value is 0-based. e.g., 0 for Farvardin.
  * @param date the value used to set the {@link #DATE DATE} time field in the calendar.
  * @see Category#FORMAT
  * @internal
  * @deprecated This API is ICU internal only.
  */
 @Deprecated
 public PersianCalendar(int year, int month, int date) {
   super(TimeZone.getDefault(), ULocale.getDefault(Category.FORMAT));
   this.set(Calendar.YEAR, year);
   this.set(Calendar.MONTH, month);
   this.set(Calendar.DATE, date);
 }
Пример #2
0
 /**
  * Constructs a <code>PersianCalendar</code> with the given date and time set for the default time
  * zone with the default <code>FORMAT</code> locale.
  *
  * @param year the value used to set the {@link #YEAR YEAR} time field in the calendar.
  * @param month the value used to set the {@link #MONTH MONTH} time field in the calendar. Note
  *     that the month value is 0-based. e.g., 0 for Farvardin.
  * @param date the value used to set the {@link #DATE DATE} time field in the calendar.
  * @param hour the value used to set the {@link #HOUR_OF_DAY HOUR_OF_DAY} time field in the
  *     calendar.
  * @param minute the value used to set the {@link #MINUTE MINUTE} time field in the calendar.
  * @param second the value used to set the {@link #SECOND SECOND} time field in the calendar.
  * @see Category#FORMAT
  * @internal
  * @deprecated This API is ICU internal only.
  */
 @Deprecated
 public PersianCalendar(int year, int month, int date, int hour, int minute, int second) {
   super(TimeZone.getDefault(), ULocale.getDefault(Category.FORMAT));
   this.set(Calendar.YEAR, year);
   this.set(Calendar.MONTH, month);
   this.set(Calendar.DATE, date);
   this.set(Calendar.HOUR_OF_DAY, hour);
   this.set(Calendar.MINUTE, minute);
   this.set(Calendar.SECOND, second);
 }
 /**
  * Construct a <code>DangiCalendar</code> with the give date set in the default time zone with the
  * default locale.
  *
  * @param date The date to which the new calendar is set.
  * @internal
  * @deprecated This API is ICU internal only.
  */
 public DangiCalendar(Date date) {
   this(TimeZone.getDefault(), ULocale.getDefault(Category.FORMAT));
   setTime(date);
 }
 /**
  * Construct a <code>DangiCalendar</code> with the default time zone and locale.
  *
  * @internal
  * @deprecated This API is ICU internal only.
  */
 public DangiCalendar() {
   this(TimeZone.getDefault(), ULocale.getDefault(Category.FORMAT));
 }
Пример #5
0
 /**
  * Returns a name of this time zone suitable for presentation to the user in the specified locale.
  * If the display name is not available for the locale, then this method returns a string in the
  * localized GMT offset format such as <code>GMT[+-]HH:mm</code>.
  *
  * @param daylight if true, return the daylight savings name.
  * @param style the output style of the display name. Valid styles are <code>SHORT</code>, <code>
  *     LONG</code>, <code>SHORT_GENERIC</code>, <code>LONG_GENERIC</code>, <code>SHORT_GMT</code>,
  *     <code>LONG_GMT</code>, <code>SHORT_COMMONLY_USED</code> or <code>GENERIC_LOCATION</code>.
  * @param locale the locale in which to supply the display name.
  * @return the human-readable name of this time zone in the given locale or in the default locale
  *     if the given locale is not recognized.
  * @exception IllegalArgumentException style is invalid.
  * @stable ICU 2.0
  */
 public String getDisplayName(boolean daylight, int style, Locale locale) {
   return getDisplayName(daylight, style, ULocale.forLocale(locale));
 }
Пример #6
0
 /**
  * Returns a name of this time zone suitable for presentation to the user in the default <code>
  * DISPLAY</code> locale. If the display name is not available for the locale, then this method
  * returns a string in the localized GMT offset format such as <code>GMT[+-]HH:mm</code>.
  *
  * @param daylight if true, return the daylight savings name.
  * @param style the output style of the display name. Valid styles are <code>SHORT</code>, <code>
  *     LONG</code>, <code>SHORT_GENERIC</code>, <code>LONG_GENERIC</code>, <code>SHORT_GMT</code>,
  *     <code>LONG_GMT</code>, <code>SHORT_COMMONLY_USED</code> or <code>GENERIC_LOCATION</code>.
  * @return the human-readable name of this time zone in the default locale.
  * @see Category#DISPLAY
  * @stable ICU 2.0
  */
 public final String getDisplayName(boolean daylight, int style) {
   return getDisplayName(daylight, style, ULocale.getDefault(Category.DISPLAY));
 }
Пример #7
0
 /**
  * Returns a name of this time zone suitable for presentation to the user in the specified locale.
  * This method returns the long generic name. If the display name is not available for the locale,
  * a fallback based on the country, city, or time zone id will be used.
  *
  * @param locale the locale in which to supply the display name.
  * @return the human-readable name of this time zone in the given locale or in the default locale
  *     if the given locale is not recognized.
  * @stable ICU 2.0
  */
 public final String getDisplayName(Locale locale) {
   return _getDisplayName(LONG_GENERIC, false, ULocale.forLocale(locale));
 }
Пример #8
0
 /**
  * Returns a name of this time zone suitable for presentation to the user in the default <code>
  * DISPLAY</code> locale. This method returns the long generic name. If the display name is not
  * available for the locale, a fallback based on the country, city, or time zone id will be used.
  *
  * @return the human-readable name of this time zone in the default locale.
  * @see Category#DISPLAY
  * @stable ICU 2.0
  */
 public final String getDisplayName() {
   return _getDisplayName(LONG_GENERIC, false, ULocale.getDefault(Category.DISPLAY));
 }
Пример #9
0
 /**
  * Constructs a default <code>PersianCalendar</code> using the current time in the default time
  * zone with the default <code>FORMAT</code> locale.
  *
  * @see Category#FORMAT
  * @internal
  * @deprecated This API is ICU internal only.
  */
 @Deprecated
 public PersianCalendar() {
   this(TimeZone.getDefault(), ULocale.getDefault(Category.FORMAT));
 }
Пример #10
0
 /**
  * Constructs a <code>PersianCalendar</code> with the given date set in the default time zone with
  * the default <code>FORMAT</code> locale.
  *
  * @param date The date to which the new calendar is set.
  * @see Category#FORMAT
  * @internal
  * @deprecated This API is ICU internal only.
  */
 @Deprecated
 public PersianCalendar(Date date) {
   super(TimeZone.getDefault(), ULocale.getDefault(Category.FORMAT));
   this.setTime(date);
 }