/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | DateTest.java | 24 import java.util.Date; 39 long now = new Date().getTime(); in test_Constructor() 49 Date d1 = new Date(70, 0, 1); // the epoch + local time in test_ConstructorIII() 52 Date d2 = new Date(0 + d1.getTimezoneOffset() * 60 * 1000); in test_ConstructorIII() 56 Date date = new Date(99, 5, 22); in test_ConstructorIII() 68 Date d1 = new Date(70, 0, 1, 1, 1); in test_ConstructorIIIII() 71 Date d2 = new Date(0 + d1.getTimezoneOffset() * 60 * 1000 + 60 * 60 in test_ConstructorIIIII() 84 Date d1 = new Date(70, 0, 1, 1, 1, 1); in test_ConstructorIIIIII() 87 Date d2 = new Date(0 + d1.getTimezoneOffset() * 60 * 1000 + 60 * 60 in test_ConstructorIIIIII() 98 Date d1 = new Date("January 1, 1970, 00:00:00 GMT"); // the epoch in test_ConstructorLjava_lang_String() [all …]
|
/libcore/ojluni/src/main/java/sun/util/calendar/ |
D | Gregorian.java | 39 static class Date extends BaseCalendar.Date { class in Gregorian 40 protected Date() { in Date() method in Gregorian.Date 44 protected Date(TimeZone zone) { in Date() method in Gregorian.Date 64 public Date getCalendarDate() { in getCalendarDate() 68 public Date getCalendarDate(long millis) { in getCalendarDate() 72 public Date getCalendarDate(long millis, CalendarDate date) { in getCalendarDate() 73 return (Date) super.getCalendarDate(millis, date); in getCalendarDate() 76 public Date getCalendarDate(long millis, TimeZone zone) { in getCalendarDate() 80 public Date newCalendarDate() { in newCalendarDate() 81 return new Date(); in newCalendarDate() [all …]
|
D | JulianCalendar.java | 47 private static class Date extends BaseCalendar.Date { class in JulianCalendar 48 protected Date() { in Date() method in JulianCalendar.Date 53 protected Date(TimeZone zone) { in Date() method in JulianCalendar.Date 58 public Date setEra(Era era) { in setEra() 121 public Date getCalendarDate() { in getCalendarDate() 125 public Date getCalendarDate(long millis) { in getCalendarDate() 129 public Date getCalendarDate(long millis, CalendarDate date) { in getCalendarDate() 130 return (Date) super.getCalendarDate(millis, date); in getCalendarDate() 133 public Date getCalendarDate(long millis, TimeZone zone) { in getCalendarDate() 137 public Date newCalendarDate() { in newCalendarDate() [all …]
|
D | LocalGregorianCalendar.java | 45 public static class Date extends BaseCalendar.Date { class in LocalGregorianCalendar 47 protected Date() { in Date() method in LocalGregorianCalendar.Date 51 protected Date(TimeZone zone) { in Date() method in LocalGregorianCalendar.Date 58 public Date setEra(Era era) { in setEra() 67 public Date addYear(int localYear) { in addYear() 74 public Date setYear(int localYear) { in setYear() 193 public Date getCalendarDate() { in getCalendarDate() 198 public Date getCalendarDate(long millis) { in getCalendarDate() 203 public Date getCalendarDate(long millis, TimeZone zone) { in getCalendarDate() 208 public Date getCalendarDate(long millis, CalendarDate date) { in getCalendarDate() [all …]
|
D | BaseCalendar.java | 143 public abstract static class Date extends CalendarDate { class in BaseCalendar 144 protected Date() { in Date() method in BaseCalendar.Date 147 protected Date(TimeZone zone) { in Date() method in BaseCalendar.Date 151 public Date setNormalizedDate(int normalizedYear, int month, int dayOfMonth) { in setNormalizedDate() 192 Date bdate = (Date) date; in validate() 205 if (dow != Date.FIELD_UNDEFINED && dow != getDayOfWeek(bdate)) { in validate() 222 Date bdate = (Date) date; in normalize() 273 Date bdate = (Date) date; in normalizeMonth() 307 return isLeapYear(((Date)date).getNormalizedYear()) ? 366 : 365; in getYearLength() 326 Date gdate = (Date) date; in getMonthLength() [all …]
|
/libcore/ojluni/src/test/java/util/Date/ |
D | DateTest.java | 30 package test.java.util.Date; 45 Date OUT; in testParseOfGMT() 51 OUT = new Date( stringVal ); in testParseOfGMT() 62 Date d1= new Date(80,-1,2); in testDateNegativeYears() 63 d1= new Date(-80,-1,2); in testDateNegativeYears() 65 d1= new Date(-800000,-1,2); in testDateNegativeYears() 79 Date d1=new java.util.Date(97,8,13,10,8,13); in testDate480() 80 Date d2=new java.util.Date(97,8,13,30,8,13); // 20 hours later in testDate480() 90 Date t1 = cal.getTime(); in testDate480() 93 Date t2 = cal.getTime(); in testDate480()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | DateTest.java | 21 import java.util.Date; 32 assertEquals("Wed Dec 31 18:00:00 CST 1969", new Date(0).toString()); in test_toString_us() 41 assertEquals("Wed Dec 31 18:00:00 CST 1969", new Date(0).toString()); in test_toString_nonUs() 85 Date.parse("Wed, 06 Jan 2016 11:55:59 GMT+05:00"), in test_parse_timezones() 86 Date.parse("Wed, 06 Jan 2016 11:55:59 GMT+0500")); in test_parse_timezones() 89 Date.parse("Wed, 06 Jan 2016 11:55:59 GMT+05:00"), in test_parse_timezones() 90 Date.parse("Wed, 06 Jan 2016 11:55:59 GMT+05")); in test_parse_timezones() 108 assertEquals(new Date(millis), Date.from(Instant.ofEpochMilli(millis))); in check_convertFromAndToInstant_milliseconds() 109 assertEquals(new Date(millis).toInstant(), Instant.ofEpochMilli(millis)); in check_convertFromAndToInstant_milliseconds() 129 Date.from(Instant.ofEpochSecond(minSecond)); in test_convertFromInstant_secondsAndNanos() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | Date.java | 133 public class Date class 134 implements java.io.Serializable, Cloneable, Comparable<Date> 148 private transient BaseCalendar.Date cdate; 167 public Date() { in Date() method in Date 180 public Date(long date) { in Date() method in Date 199 public Date(int year, int month, int date) { in Date() method in Date 221 public Date(int year, int month, int date, int hrs, int min) { in Date() method in Date 244 public Date(int year, int month, int date, int hrs, int min, int sec) { in Date() method in Date 255 cdate = (BaseCalendar.Date) cal.newCalendarDate(TimeZone.getDefaultRef()); in Date() 274 public Date(String s) { in Date() method in Date [all …]
|
/libcore/ojluni/src/main/java/sun/security/x509/ |
D | CertificateValidity.java | 30 import java.util.Date; 57 private Date notBefore; 58 private Date notAfter; 61 private Date getNotBefore() { in getNotBefore() 62 return (new Date(notBefore.getTime())); in getNotBefore() 66 private Date getNotAfter() { in getNotAfter() 67 return (new Date(notAfter.getTime())); in getNotAfter() 115 public CertificateValidity(Date notBefore, Date notAfter) { in CertificateValidity() 177 if (!(obj instanceof Date)) { in set() 181 notBefore = (Date)obj; in set() [all …]
|
D | PrivateKeyUsageExtension.java | 34 import java.util.Date; 80 private Date notBefore = null; 81 private Date notAfter = null; 116 public PrivateKeyUsageExtension(Date notBefore, Date notAfter) in PrivateKeyUsageExtension() 195 Date now = new Date(); in valid() 208 public void valid(Date now) in valid() 249 if (!(obj instanceof Date)) { in set() 253 notBefore = (Date)obj; in set() 255 notAfter = (Date)obj; in set() 267 public Date get(String name) throws CertificateException { in get() [all …]
|
D | InvalidityDateExtension.java | 30 import java.util.Date; 69 private Date date; 87 public InvalidityDateExtension(Date date) throws IOException { in InvalidityDateExtension() 97 public InvalidityDateExtension(boolean critical, Date date) in InvalidityDateExtension() 126 if (!(obj instanceof Date)) { in set() 130 date = (Date) obj; in set() 141 public Date get(String name) throws IOException { in get() 146 return (new Date(date.getTime())); // clone in get()
|
/libcore/ojluni/annotations/hiddenapi/sun/util/calendar/ |
D | LocalGregorianCalendar.java | 44 public sun.util.calendar.LocalGregorianCalendar.Date getCalendarDate() { in getCalendarDate() 48 public sun.util.calendar.LocalGregorianCalendar.Date getCalendarDate(long millis) { in getCalendarDate() 52 public sun.util.calendar.LocalGregorianCalendar.Date getCalendarDate( in getCalendarDate() 57 public sun.util.calendar.LocalGregorianCalendar.Date getCalendarDate( in getCalendarDate() 62 private sun.util.calendar.LocalGregorianCalendar.Date adjustYear( in adjustYear() 63 sun.util.calendar.LocalGregorianCalendar.Date ldate, long millis, int zoneOffset) { in adjustYear() 67 public sun.util.calendar.LocalGregorianCalendar.Date newCalendarDate() { in newCalendarDate() 72 public sun.util.calendar.LocalGregorianCalendar.Date newCalendarDate(java.util.TimeZone zone) { in newCalendarDate() 115 public static class Date extends sun.util.calendar.BaseCalendar.Date { class in LocalGregorianCalendar 117 protected Date() { in Date() method in LocalGregorianCalendar.Date [all …]
|
/libcore/ojluni/src/test/java/util/Timer/ |
D | Args.java | 39 void schedule(final Timer t, final TimerTask task, final Date d) { in schedule() 46 void schedule(final Timer t, final TimerTask task, final Date d, final in schedule() 55 Date d, final long period) { in scheduleAtFixedRate() 87 final Date past = new Date(System.currentTimeMillis() - DELAY_MS); 88 final Date future = new Date(System.currentTimeMillis() + DELAY_MS); 106 () -> t.schedule(x, new Date(-42)), 110 () -> t.schedule(x, new Date(-42), 42), 113 () -> t.schedule(x, new Date(42), 0), 115 () -> t.schedule(x, new Date(42), -42), 118 () -> t.scheduleAtFixedRate(x, new Date(-42), 42), [all …]
|
/libcore/ojluni/src/main/java/java/security/cert/ |
D | CertificateRevokedException.java | 32 import java.util.Date; 57 private Date revocationDate; 88 public CertificateRevokedException(Date revocationDate, CRLReason reason, in CertificateRevokedException() 94 this.revocationDate = new Date(revocationDate.getTime()); in CertificateRevokedException() 110 public Date getRevocationDate() { in getRevocationDate() 111 return (Date) revocationDate.clone(); in getRevocationDate() 147 public Date getInvalidityDate() { in getInvalidityDate() 153 Date invalidity = InvalidityDateExtension.toImpl(ext).get("DATE"); in getInvalidityDate() 154 return new Date(invalidity.getTime()); in getInvalidityDate() 224 revocationDate = new Date(revocationDate.getTime()); in readObject()
|
D | X509CRLSelector.java | 84 private Date dateAndTime; 421 public void setDateAndTime(Date dateAndTime) { in setDateAndTime() 425 this.dateAndTime = new Date(dateAndTime.getTime()); in setDateAndTime() 433 void setDateAndTime(Date dateAndTime, long skew) { in setDateAndTime() 435 (dateAndTime == null ? null : new Date(dateAndTime.getTime())); in setDateAndTime() 542 public Date getDateAndTime() { in getDateAndTime() 545 return (Date) dateAndTime.clone(); in getDateAndTime() 668 Date crlThisUpdate = xcrl.getThisUpdate(); in match() 669 Date nextUpdate = xcrl.getNextUpdate(); in match() 676 Date nowPlusSkew = dateAndTime; in match() [all …]
|
/libcore/ojluni/src/main/java/java/security/ |
D | Timestamp.java | 32 import java.util.Date; 54 private Date timestamp; 75 public Timestamp(Date timestamp, CertPath signerCertPath) { in Timestamp() 79 this.timestamp = new Date(timestamp.getTime()); // clone in Timestamp() 88 public Date getTimestamp() { in getTimestamp() 89 return new Date(timestamp.getTime()); // clone in getTimestamp() 162 timestamp = new Date(timestamp.getTime()); in readObject()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | SimpleDateFormatTest.java | 26 import java.util.Date; 53 assertTrue("Doesn't work", f2.format(new Date()).getClass() == String.class); in test_Constructor() 63 assertTrue("Doesn't work", f2.format(new Date()).getClass() == String.class); in test_ConstructorLjava_lang_String() 91 assertTrue("Doesn't work", f2.format(new Date()).getClass() == String.class); in test_ConstructorLjava_lang_StringLjava_text_DateFormatSymbols() 114 assertTrue("Doesn't work", f2.format(new Date()).getClass() == String.class); in test_ConstructorLjava_lang_StringLjava_util_Locale() 209 format.format(new Date()); in test_equalsLjava_lang_Object() 216 df.format(new Date()); in test_equals_afterFormat() 224 format.format(new Date()); in test_hashCode() 383 assertEquals("Wrong output", "Mkz':.@5", format.format(new Date())); in test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() 456 Date summerDate = new GregorianCalendar(1999, Calendar.JUNE, 2, 15, 3, 6).getTime(); in test_timeZoneFormatting() [all …]
|
D | DateFormatTest.java | 26 import java.util.Date; 87 f2.format(new Date()).getClass() == String.class); in test_getDateInstance() 105 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceI() 114 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceI() 123 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceI() 132 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceI() 153 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceILjava_util_Locale() 161 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceILjava_util_Locale() 169 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceILjava_util_Locale() 177 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceILjava_util_Locale() [all …]
|
/libcore/ojluni/annotations/hiddenapi/sun/security/x509/ |
D | CertificateValidity.java | 39 public CertificateValidity(java.util.Date notBefore, java.util.Date notAfter) { in CertificateValidity() 47 private java.util.Date getNotBefore() { in getNotBefore() 51 private java.util.Date getNotAfter() { in getNotAfter() 71 public java.util.Date get(java.lang.String name) throws java.io.IOException { in get() 93 public void valid(java.util.Date now) in valid() 109 private java.util.Date notAfter; 111 private java.util.Date notBefore;
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | SimpleDateFormatTest.java | 29 import java.util.Date; 74 Date date = new Date(0); in testDefaultConstructor_localeUS() 85 Date originalDate = sdf.get2DigitYearStart(); in test2DigitYearStartIsCloned() 91 Date newDate = new Date(); in test2DigitYearStartIsCloned() 216 format.format(new Date(((long) Integer.MIN_VALUE + Integer.MIN_VALUE) * 1000L))); in test2038() 218 format.format(new Date(Integer.MIN_VALUE * 1000L))); in test2038() 220 format.format(new Date(0L))); in test2038() 222 format.format(new Date(Integer.MAX_VALUE * 1000L))); in test2038() 224 format.format(new Date((2L + Integer.MAX_VALUE + Integer.MAX_VALUE) * 1000L))); in test2038() 234 return dateFormat.format(new Date(0)); in formatDate() [all …]
|
D | OldDateFormatTest.java | 27 import java.util.Date; 42 public Date parse(String source, ParsePosition pos) { in parse() 48 public StringBuffer format(Date date, StringBuffer toAppendTo, in format() 95 Date current = new Date(); in test_formatLjava_util_Date() 118 Date current = new Date(); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() 227 Date current = new Date(); in test_parseLString() 230 Date date = format.parse(format.format(current).toString()); in test_parseLString() 263 Date date = format.parse(format.format(current).toString()); in test_parseLString() 291 Date date = format.parse(format.format(current).toString()); in test_parseLString() 305 Date date = format.parse(format.format(current).toString()); in test_parseLString() [all …]
|
/libcore/luni/src/test/java/tests/security/cert/ |
D | X509CRLSelector2Test.java | 28 import java.util.Date; 285 TestCRL crl = new TestCRL(new Date(200), new Date(300)); in testSetDateAndTimeLjava_util_Date() 289 selector.setDateAndTime(new Date(200)); in testSetDateAndTimeLjava_util_Date() 292 selector.setDateAndTime(new Date(250)); in testSetDateAndTimeLjava_util_Date() 295 selector.setDateAndTime(new Date(300)); in testSetDateAndTimeLjava_util_Date() 298 selector.setDateAndTime(new Date(150)); in testSetDateAndTimeLjava_util_Date() 301 selector.setDateAndTime(new Date(350)); in testSetDateAndTimeLjava_util_Date() 418 Date date = new Date(200); in testGetDateAndTime() 465 Date date = new Date(200); in testClone() 476 crl.setUpdateDates(new Date(200), new Date(200)); in testClone() [all …]
|
/libcore/ojluni/src/main/java/java/sql/ |
D | Date.java | 41 public class Date extends java.util.Date { class 57 public Date(int year, int month, int day) { in Date() method in Date 73 public Date(long date) { in Date() method in Date 109 public static Date valueOf(String s) { in valueOf() 117 Date d = null; in valueOf() 138 d = new Date(year - 1900, month - 1, day); in valueOf()
|
/libcore/ojluni/src/main/java/sun/net/ftp/ |
D | FtpDirEntry.java | 27 import java.util.Date; 60 private java.util.Date created = null; 61 private java.util.Date lastModified = null; 194 public java.util.Date getLastModified() { in getLastModified() 206 public FtpDirEntry setLastModified(Date lastModified) { in setLastModified() 297 public Date getCreated() { in getCreated() 309 public FtpDirEntry setCreated(Date created) { in setCreated()
|
/libcore/ojluni/src/main/java/sun/security/provider/certpath/ |
D | AdaptableX509CertSelector.java | 35 import java.util.Date; 55 private Date startDate; 58 private Date endDate; 85 void setValidityPeriod(Date startDate, Date endDate) { in setValidityPeriod() 251 copy.startDate = (Date)startDate.clone(); in clone() 255 copy.endDate = (Date)endDate.clone(); in clone()
|