Home
last modified time | relevance | path

Searched refs:Date (Results 1 – 25 of 177) sorted by relevance

12345678

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DDateTest.java22 import java.util.Date;
37 long now = new Date().getTime(); in test_Constructor()
47 Date d1 = new Date(70, 0, 1); // the epoch + local time in test_ConstructorIII()
50 Date d2 = new Date(0 + d1.getTimezoneOffset() * 60 * 1000); in test_ConstructorIII()
54 Date date = new Date(99, 5, 22); in test_ConstructorIII()
66 Date d1 = new Date(70, 0, 1, 1, 1); in test_ConstructorIIIII()
69 Date d2 = new Date(0 + d1.getTimezoneOffset() * 60 * 1000 + 60 * 60 in test_ConstructorIIIII()
82 Date d1 = new Date(70, 0, 1, 1, 1, 1); in test_ConstructorIIIIII()
85 Date d2 = new Date(0 + d1.getTimezoneOffset() * 60 * 1000 + 60 * 60 in test_ConstructorIIIIII()
96 Date d1 = new Date("January 1, 1970, 00:00:00 GMT"); // the epoch in test_ConstructorLjava_lang_String()
[all …]
DTimerTest.java21 import java.util.Date;
315 Date d = new Date(System.currentTimeMillis() + 100); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
327 d = new Date(System.currentTimeMillis() + 100); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
340 d = new Date(-100); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
350 d = new Date(System.currentTimeMillis() + 100); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
370 d = new Date(-100); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
381 d = new Date(System.currentTimeMillis() + 200); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
390 d = new Date(System.currentTimeMillis() + 100); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
394 d = new Date(System.currentTimeMillis() + 150); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
398 d = new Date(System.currentTimeMillis() + 70); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
[all …]
DFormatterTest.java37 import java.util.Date;
928 f.format("head%1$n%2$n", 1, new Date()); in test_formatLjava_lang_String$Ljava_lang_Object_LineSeparator()
1408 new Double(1.1d), "string content", new Float(1.1f), new Date() }; in test_formatLjava_lang_String$Ljava_lang_Object_CharacterConversion()
1730 Date now = new Date(1147327147578L); in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1745 { new Date(1147327147578L), 'a', "Do." }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1751 { new Date(1147327147578L), 'b', "Mai" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1757 … { new Date(1147327147578L), 'c', "Do. Mai 11 13:59:07 GMT+08:00 2006" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1763 { new Date(1147327147578L), 'd', "11" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1769 { new Date(1147327147578L), 'e', "11" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
1775 { new Date(1147327147578L), 'h', "Mai" }, //$NON-NLS-2$ in test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion()
[all …]
/libcore/ojluni/src/main/java/sun/util/calendar/
DGregorian.java39 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 …]
DJulianCalendar.java47 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 …]
DLocalGregorianCalendar.java45 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 …]
DBaseCalendar.java143 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()
303 return isLeapYear(((Date)date).getNormalizedYear()) ? 366 : 365; in getYearLength()
322 Date gdate = (Date) date; in getMonthLength()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DDateTest.java21 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/sun/security/x509/
DCertificateValidity.java30 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 …]
DPrivateKeyUsageExtension.java34 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 …]
DInvalidityDateExtension.java30 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/
DLocalGregorianCalendar.java44 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/main/java/java/util/
DDate.java131 public class Date class
132 implements java.io.Serializable, Cloneable, Comparable<Date>
146 private transient BaseCalendar.Date cdate;
164 public Date() { in Date() method in Date
177 public Date(long date) { in Date() method in Date
196 public Date(int year, int month, int date) { in Date() method in Date
219 public Date(int year, int month, int date, int hrs, int min) { in Date() method in Date
243 public Date(int year, int month, int date, int hrs, int min, int sec) { in Date() method in Date
254 cdate = (BaseCalendar.Date) cal.newCalendarDate(TimeZone.getDefaultRef()); in Date()
273 public Date(String s) { in Date() method in Date
[all …]
/libcore/ojluni/src/main/java/java/security/cert/
DCertificateRevokedException.java32 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()
DX509CRLSelector.java84 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/
DTimestamp.java32 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/ojluni/annotations/hiddenapi/sun/security/x509/
DCertificateValidity.java39 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/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DSimpleDateFormatTest.java26 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 …]
DDateFormatTest.java25 import java.util.Date;
56 f1.format(new Date()).getClass() == String.class); in test_getAvailableLocales()
81 f2.format(new Date()).getClass() == String.class); in test_getDateInstance()
99 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceI()
108 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceI()
117 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceI()
126 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceI()
147 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceILjava_util_Locale()
155 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceILjava_util_Locale()
163 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceILjava_util_Locale()
[all …]
/libcore/luni/src/test/java/libcore/java/text/
DSimpleDateFormatTest.java28 import java.util.Date;
73 Date date = new Date(0); in testDefaultConstructor_localeUS()
84 Date originalDate = sdf.get2DigitYearStart(); in test2DigitYearStartIsCloned()
90 Date newDate = new Date(); in test2DigitYearStartIsCloned()
215 format.format(new Date(((long) Integer.MIN_VALUE + Integer.MIN_VALUE) * 1000L))); in test2038()
217 format.format(new Date(Integer.MIN_VALUE * 1000L))); in test2038()
219 format.format(new Date(0L))); in test2038()
221 format.format(new Date(Integer.MAX_VALUE * 1000L))); in test2038()
223 format.format(new Date((2L + Integer.MAX_VALUE + Integer.MAX_VALUE) * 1000L))); in test2038()
233 return dateFormat.format(new Date(0)); in formatDate()
[all …]
DOldDateFormatTest.java25 import java.util.Date;
40 public Date parse(String source, ParsePosition pos) { in parse()
46 public StringBuffer format(Date date, StringBuffer toAppendTo, in format()
93 Date current = new Date(); in test_formatLjava_util_Date()
113 Date current = new Date(); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition()
222 Date current = new Date(); in test_parseLString()
225 Date date = format.parse(format.format(current).toString()); in test_parseLString()
258 Date date = format.parse(format.format(current).toString()); in test_parseLString()
286 Date date = format.parse(format.format(current).toString()); in test_parseLString()
300 Date date = format.parse(format.format(current).toString()); in test_parseLString()
[all …]
/libcore/luni/src/test/java/tests/security/cert/
DX509CRLSelector2Test.java28 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/
DDate.java41 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/
DFtpDirEntry.java27 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/
DAdaptableX509CertSelector.java35 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()

12345678