equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
903 * to begin on the date the user specifies. |
903 * to begin on the date the user specifies. |
904 * |
904 * |
905 * @param startDate During parsing, two digit years will be placed in the range |
905 * @param startDate During parsing, two digit years will be placed in the range |
906 * <code>startDate</code> to <code>startDate + 100 years</code>. |
906 * <code>startDate</code> to <code>startDate + 100 years</code>. |
907 * @see #get2DigitYearStart |
907 * @see #get2DigitYearStart |
|
908 * @throws NullPointerException if {@code startDate} is {@code null}. |
908 * @since 1.2 |
909 * @since 1.2 |
909 */ |
910 */ |
910 public void set2DigitYearStart(Date startDate) { |
911 public void set2DigitYearStart(Date startDate) { |
911 parseAmbiguousDatesAsAfter(new Date(startDate.getTime())); |
912 parseAmbiguousDatesAsAfter(new Date(startDate.getTime())); |
912 } |
913 } |
931 * @param date the date-time value to be formatted into a date-time string. |
932 * @param date the date-time value to be formatted into a date-time string. |
932 * @param toAppendTo where the new date-time text is to be appended. |
933 * @param toAppendTo where the new date-time text is to be appended. |
933 * @param pos the formatting position. On input: an alignment field, |
934 * @param pos the formatting position. On input: an alignment field, |
934 * if desired. On output: the offsets of the alignment field. |
935 * if desired. On output: the offsets of the alignment field. |
935 * @return the formatted date-time string. |
936 * @return the formatted date-time string. |
936 * @exception NullPointerException if the given {@code date} is {@code null}. |
937 * @exception NullPointerException if any of the parameters is {@code null}. |
937 */ |
938 */ |
938 @Override |
939 @Override |
939 public StringBuffer format(Date date, StringBuffer toAppendTo, |
940 public StringBuffer format(Date date, StringBuffer toAppendTo, |
940 FieldPosition pos) |
941 FieldPosition pos) |
941 { |
942 { |