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

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

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

SimpleDateFormat.get2DigitYearStart介绍

[英]Returns the date which is the start of the one hundred year period for two-digit year values. See #set2DigitYearStart for details.
[中]返回两位数年份值的百年期开始日期。有关详细信息,请参见#set2DigitYearStart。

代码示例

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

  1. return localSimpleDateFormat.get().get2DigitYearStart();

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

  1. SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yy");
  2. String aDate = "03/17/40";
  3. Calendar cal = Calendar.getInstance();
  4. cal.clear();
  5. cal.set(Calendar.YEAR, 2000);
  6. dateFormat.set2DigitYearStart(cal.getTime());
  7. System.out.println(dateFormat.get2DigitYearStart());
  8. System.out.println(dateFormat.parse(aDate));

代码示例来源:origin: at.bestsolution.eclipse/com.ibm.icu.base

  1. /**
  2. * Returns the beginning date of the 100-year period 2-digit years are interpreted
  3. * as being within.
  4. * @return the start of the 100-year period into which two digit years are
  5. * parsed
  6. * @stable ICU 2.0
  7. */
  8. public Date get2DigitYearStart() {
  9. return ((java.text.SimpleDateFormat)dateFormat).get2DigitYearStart();
  10. }

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.ibm.icu.base

  1. /**
  2. * Returns the beginning date of the 100-year period 2-digit years are interpreted
  3. * as being within.
  4. * @return the start of the 100-year period into which two digit years are
  5. * parsed
  6. * @stable ICU 2.0
  7. */
  8. public Date get2DigitYearStart() {
  9. return ((java.text.SimpleDateFormat)dateFormat).get2DigitYearStart();
  10. }

代码示例来源:origin: org.refcodes/refcodes-date

  1. /**
  2. * {@inheritDoc}
  3. *
  4. * @deprecated as it is not considered to be thread safe.
  5. */
  6. @Deprecated
  7. @Override
  8. public Date get2DigitYearStart() {
  9. return super.get2DigitYearStart();
  10. }

代码示例来源:origin: novoda/notils

  1. public Date get2DigitYearStart() {
  2. return localSimpleDateFormat.get().get2DigitYearStart();
  3. }

代码示例来源:origin: com.novoda/notils

  1. public Date get2DigitYearStart() {
  2. return localSimpleDateFormat.get().get2DigitYearStart();
  3. }

代码示例来源:origin: EvoSuite/evosuite

  1. public java.util.Date get2DigitYearStart() {
  2. Capturer.capture(Instrumenter.CAPTURE_ID_JAVA_TEXT_SIMPLEDATEFORMAT, this, "get2DigitYearStart", "()Ljava/util/Date;", new Object[] {});
  3. java.util.Date ret = new Date(super.get2DigitYearStart().getTime());
  4. Capturer.enable(Instrumenter.CAPTURE_ID_JAVA_TEXT_SIMPLEDATEFORMAT, this, ret);
  5. return ret;
  6. }

相关文章

SimpleDateFormat类方法