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

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

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

SimpleDateFormat.initializeCalendar介绍

暂无

代码示例

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

  1. java.text.SimpleDateFormat.initializeCalendar(Locale)

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

  1. /**
  2. * Constructs a <code>SimpleDateFormat</code> using the given pattern and
  3. * date format symbols.
  4. *
  5. * @param pattern the pattern describing the date and time format
  6. * @param formatSymbols the date format symbols to be used for formatting
  7. * @exception NullPointerException if the given pattern or formatSymbols is null
  8. * @exception IllegalArgumentException if the given pattern is invalid
  9. */
  10. public SimpleDateFormat(String pattern, DateFormatSymbols formatSymbols)
  11. {
  12. if (pattern == null || formatSymbols == null) {
  13. throw new NullPointerException();
  14. }
  15. this.pattern = pattern;
  16. this.formatData = (DateFormatSymbols) formatSymbols.clone();
  17. this.locale = Locale.getDefault(Locale.Category.FORMAT);
  18. initializeCalendar(this.locale);
  19. initialize(this.locale);
  20. useDateFormatSymbols = true;
  21. }

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

  1. /**
  2. * Constructs a <code>SimpleDateFormat</code> using the given pattern and
  3. * date format symbols.
  4. *
  5. * @param pattern the pattern describing the date and time format
  6. * @param formatSymbols the date format symbols to be used for formatting
  7. * @exception NullPointerException if the given pattern or formatSymbols is null
  8. * @exception IllegalArgumentException if the given pattern is invalid
  9. */
  10. public SimpleDateFormat(String pattern, DateFormatSymbols formatSymbols)
  11. {
  12. if (pattern == null || formatSymbols == null) {
  13. throw new NullPointerException();
  14. }
  15. this.pattern = pattern;
  16. this.formatData = (DateFormatSymbols) formatSymbols.clone();
  17. this.locale = Locale.getDefault(Locale.Category.FORMAT);
  18. initializeCalendar(this.locale);
  19. initialize(this.locale);
  20. useDateFormatSymbols = true;
  21. }

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

  1. /**
  2. * Constructs a <code>SimpleDateFormat</code> using the given pattern and
  3. * the default date format symbols for the given locale.
  4. * <b>Note:</b> This constructor may not support all locales.
  5. * For full coverage, use the factory methods in the {@link DateFormat}
  6. * class.
  7. *
  8. * @param pattern the pattern describing the date and time format
  9. * @param locale the locale whose date format symbols should be used
  10. * @exception NullPointerException if the given pattern or locale is null
  11. * @exception IllegalArgumentException if the given pattern is invalid
  12. */
  13. public SimpleDateFormat(String pattern, Locale locale)
  14. {
  15. if (pattern == null || locale == null) {
  16. throw new NullPointerException();
  17. }
  18. initializeCalendar(locale);
  19. this.pattern = pattern;
  20. this.formatData = DateFormatSymbols.getInstanceRef(locale);
  21. this.locale = locale;
  22. initialize(locale);
  23. }

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

  1. /**
  2. * Constructs a <code>SimpleDateFormat</code> using the given pattern and
  3. * the default date format symbols for the given locale.
  4. * <b>Note:</b> This constructor may not support all locales.
  5. * For full coverage, use the factory methods in the {@link DateFormat}
  6. * class.
  7. *
  8. * @param pattern the pattern describing the date and time format
  9. * @param locale the locale whose date format symbols should be used
  10. * @exception NullPointerException if the given pattern or locale is null
  11. * @exception IllegalArgumentException if the given pattern is invalid
  12. */
  13. public SimpleDateFormat(String pattern, Locale locale)
  14. {
  15. if (pattern == null || locale == null) {
  16. throw new NullPointerException();
  17. }
  18. initializeCalendar(locale);
  19. this.pattern = pattern;
  20. this.formatData = DateFormatSymbols.getInstanceRef(locale);
  21. this.locale = locale;
  22. initialize(locale);
  23. }

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

  1. initializeCalendar(loc);

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

  1. initializeCalendar(loc);

相关文章

SimpleDateFormat类方法