java.text.SimpleDateFormat.initializeCalendar()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(118)

本文整理了Java中java.text.SimpleDateFormat.initializeCalendar()方法的一些代码示例,展示了SimpleDateFormat.initializeCalendar()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SimpleDateFormat.initializeCalendar()方法的具体详情如下:
包路径:java.text.SimpleDateFormat
类名称:SimpleDateFormat
方法名:initializeCalendar

SimpleDateFormat.initializeCalendar介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

java.text.SimpleDateFormat.initializeCalendar(Locale)

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/**
 * Constructs a <code>SimpleDateFormat</code> using the given pattern and
 * date format symbols.
 *
 * @param pattern the pattern describing the date and time format
 * @param formatSymbols the date format symbols to be used for formatting
 * @exception NullPointerException if the given pattern or formatSymbols is null
 * @exception IllegalArgumentException if the given pattern is invalid
 */
public SimpleDateFormat(String pattern, DateFormatSymbols formatSymbols)
{
  if (pattern == null || formatSymbols == null) {
    throw new NullPointerException();
  }
  this.pattern = pattern;
  this.formatData = (DateFormatSymbols) formatSymbols.clone();
  this.locale = Locale.getDefault(Locale.Category.FORMAT);
  initializeCalendar(this.locale);
  initialize(this.locale);
  useDateFormatSymbols = true;
}

代码示例来源:origin: jtulach/bck2brwsr

/**
 * Constructs a <code>SimpleDateFormat</code> using the given pattern and
 * date format symbols.
 *
 * @param pattern the pattern describing the date and time format
 * @param formatSymbols the date format symbols to be used for formatting
 * @exception NullPointerException if the given pattern or formatSymbols is null
 * @exception IllegalArgumentException if the given pattern is invalid
 */
public SimpleDateFormat(String pattern, DateFormatSymbols formatSymbols)
{
  if (pattern == null || formatSymbols == null) {
    throw new NullPointerException();
  }
  this.pattern = pattern;
  this.formatData = (DateFormatSymbols) formatSymbols.clone();
  this.locale = Locale.getDefault(Locale.Category.FORMAT);
  initializeCalendar(this.locale);
  initialize(this.locale);
  useDateFormatSymbols = true;
}

代码示例来源:origin: jtulach/bck2brwsr

/**
 * Constructs a <code>SimpleDateFormat</code> using the given pattern and
 * the default date format symbols for the given locale.
 * <b>Note:</b> This constructor may not support all locales.
 * For full coverage, use the factory methods in the {@link DateFormat}
 * class.
 *
 * @param pattern the pattern describing the date and time format
 * @param locale the locale whose date format symbols should be used
 * @exception NullPointerException if the given pattern or locale is null
 * @exception IllegalArgumentException if the given pattern is invalid
 */
public SimpleDateFormat(String pattern, Locale locale)
{
  if (pattern == null || locale == null) {
    throw new NullPointerException();
  }
  initializeCalendar(locale);
  this.pattern = pattern;
  this.formatData = DateFormatSymbols.getInstanceRef(locale);
  this.locale = locale;
  initialize(locale);
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/**
 * Constructs a <code>SimpleDateFormat</code> using the given pattern and
 * the default date format symbols for the given locale.
 * <b>Note:</b> This constructor may not support all locales.
 * For full coverage, use the factory methods in the {@link DateFormat}
 * class.
 *
 * @param pattern the pattern describing the date and time format
 * @param locale the locale whose date format symbols should be used
 * @exception NullPointerException if the given pattern or locale is null
 * @exception IllegalArgumentException if the given pattern is invalid
 */
public SimpleDateFormat(String pattern, Locale locale)
{
  if (pattern == null || locale == null) {
    throw new NullPointerException();
  }
  initializeCalendar(locale);
  this.pattern = pattern;
  this.formatData = DateFormatSymbols.getInstanceRef(locale);
  this.locale = locale;
  initialize(locale);
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

initializeCalendar(loc);

代码示例来源:origin: jtulach/bck2brwsr

initializeCalendar(loc);

相关文章

SimpleDateFormat类方法