Searched refs:date (Results 1 - 25 of 37) sorted by relevance

12

/libcore/luni/src/main/java/org/apache/harmony/security/x509/
H A DInvalidityDate.java35 /** invalidity date value */
36 private final Date date; field in class:InvalidityDate
43 date = (Date) ASN1.decode(encoding);
47 * Returns the invalidity date.
50 return date;
58 encoding = ASN1.encode(date);
64 sb.append(prefix).append("Invalidity Date: [ ").append(date).append(" ]\n");
/libcore/luni/src/test/java/libcore/java/text/
H A DOldDateFormatTest.java46 public StringBuffer format(Date date, StringBuffer toAppendTo, argument
94 assertTrue("Incorrect date format", sdf.format(current).equals(dtf));
114 assertTrue("Incorrect date format", sdf.format(current).equals(
219 Date date = format.parse(format.format(current).toString());
220 assertEquals(current.getDate(), date.getDate());
221 assertEquals(current.getDay(), date.getDay());
222 assertEquals(current.getMonth(), date.getMonth());
223 assertEquals(current.getYear(), date.getYear());
224 assertEquals(current.getHours(), date.getHours());
225 assertEquals(current.getMinutes(), date
[all...]
H A DSimpleDateFormatTest.java116 String date = "2010-12-23 12:44:57.0 CET";
118 assertEquals(1293104697000L, parseDate(Locale.UK, fmt, date).getTimeInMillis());
119 // ...but not in the US. Check we can parse such a date anyway.
120 assertEquals(1293104697000L, parseDate(Locale.US, fmt, date).getTimeInMillis());
127 String date = "1970-01-01 01:00:00.000 CET";
130 assertEquals(date, sdf.format(new Date(0)));
133 assertEquals(date, sdf.format(new Date(0)));
165 Date date = sdf.parse("2010-07-08 02:44:48");
166 assertEquals(1278557088000L, date.getTime());
169 assertEquals("2010-07-07T19:44:48-0700", sdf.format(date));
[all...]
H A DOldMessageFormatTest.java43 String pattern = "A {3, number, currency} B {2, time} C {0, number, percent} D {4} E {1,choice,0#off|1#on} F {0, date}";
180 Date date = new Date();
182 + DateFormat.getTimeInstance().format(date);
184 new Integer(3), date }, buffer, new FieldPosition(MessageFormat
217 Date date = new Date(12345678);
218 Object[] args = { date, iCurrency, iInteger };
221 String pattern = "Date: {0,date} Currency: {1, number, currency} Integer: {2, number, integer}";
227 pattern = "abc {4, number, integer} def {3,date} ghi {2,number} jkl {1,choice,0#low|1#high} mnop {0}";
229 Object[] args_ = { iInteger, 1, iInteger, date, iInteger };
253 "Invalid {1,date,invali
[all...]
/libcore/support/src/test/java/tests/support/
H A DSupport_MessageFormat.java47 String pattern = "On {4,date} at {3,time}, he ate {2,number, integer} hamburger{2,choice,1#|1<s} and drank {1, number} litres of coke. That was {0,choice,1#just enough|1<more than enough} food!";
50 Date date = new GregorianCalendar(2005, 1, 28, 14, 20, 16).getTime();
53 hamburgers, date, date };
74 String pattern = "On {4,date} at {3,time}, he ate {2,number, integer} hamburger{2,choice,1#|1<s} and drank {1, number} litres of coke. That was {0,choice,1#just enough|1<more than enough} food!";
77 Date date = new GregorianCalendar(2005, 1, 28, 14, 20, 16).getTime();
80 hamburgers, date, date };
/libcore/luni/src/main/java/java/util/
H A DDate.java56 * the specified date.
76 * Constructs a new {@code Date} initialized to the specified date and time in the
101 * Constructs a new {@code Date} initialized to the specified date and time in the
139 * Constructs a new {@code Date} initialized to the date and time parsed from the
155 * @param date
160 public boolean after(Date date) { argument
161 return milliseconds > date.milliseconds;
167 * @param date
172 public boolean before(Date date) { argument
173 return milliseconds < date
201 compareTo(Date date) argument
[all...]
H A DGregorianCalendar.java33 * default to the date the Gregorian calendar was instituted (October 15, 1582
34 * in some countries, later in others). The cutover date may be changed by the
54 * date, leap year rules were applied irregularly, and before 45 BC the Julian
125 * // and the current date and time
227 * Constructs a new {@code GregorianCalendar} initialized to the current date and
236 * {@code TimeZone} and {@code Locale} on the specified date.
251 * Constructs a new {@code GregorianCalendar} initialized to the specified date and
271 * Constructs a new {@code GregorianCalendar} initialized to the specified date and
299 * Constructs a new {@code GregorianCalendar} initialized to the current date and
310 * Constructs a new {@code GregorianCalendar} initialized to the current date an
1233 setGregorianChange(Date date) argument
[all...]
/libcore/luni/src/test/java/libcore/java/util/
H A DTimeZoneTest.java63 Date date = sdf.parse("1902-11-01T00:00:00.000+0800");
64 assertEquals(-2119680000000L, date.getTime());
65 assertEquals(-28800000, tz.getOffset(date.getTime()));
66 assertFalse(tz.inDaylightTime(date));
67 assertEquals("Fri Oct 31 08:00:00 PST 1902", date.toString());
68 assertEquals("31 Oct 1902 16:00:00 GMT", date.toGMTString());
70 date = sdf.parse("1902-06-01T00:00:00.000+0800");
71 assertEquals(-28800000, tz.getOffset(date.getTime()));
72 assertFalse(tz.inDaylightTime(date));
H A DOldTimeZoneTest.java41 public boolean inDaylightTime(Date date) { argument
/libcore/luni/src/main/java/java/security/cert/
H A DPKIXParameters.java50 private Date date; field in class:PKIXParameters
322 return date == null ? null : (Date)date.clone();
329 * @param date
333 public void setDate(Date date) { argument
334 this.date = (date == null ? null : new Date(date.getTime()));
567 sb.append(date);
H A DX509Certificate.java103 * Checks whether the certificate is valid at the specified date.
105 * @param date
106 * the date to check the validity against.
113 public abstract void checkValidity(Date date) argument
254 * Returns the {@code notBefore} date from the validity period of the
262 * Returns the {@code notAfter} date of the validity period of the
/libcore/luni/src/test/java/tests/api/javax/security/cert/
H A DX509CertificateTest.java271 Date date = new Date();
276 assertFalse("CertificateExpiredException expected", date
278 assertFalse("CertificateNotYetValidException expected", date
282 date.compareTo(na_date) > 0);
285 date.compareTo(nb_date) < 0);
303 * checkValidity(Date date) method testing.
313 Date[] date = new Date[4];
315 for (int i = 0; i < date.length; i++) {
317 date[i] = calendar.getTime();
321 for (int i = 0; i < date
[all...]
/libcore/luni/src/main/java/java/sql/
H A DDate.java23 * Dates are represented in SQL as {@code yyyy-MM-dd}. Note that this date
33 * date implied by the time value.
60 * Creates a date which corresponds to the day determined by the supplied
156 * Sets this date to a date supplied as a milliseconds value. The date is
172 * Produces a string representation of the date in SQL format
174 * @return a string representation of the date in SQL format - {@code "yyyy-MM-dd"}.
194 private void format(int date, int digits, StringBuilder sb) { argument
195 String str = String.valueOf(date);
[all...]
H A DTime.java33 * <i>Day</i> elements of the {@code Time} object are set to the date
202 private void format(int date, int digits, StringBuilder sb) { argument
203 String str = String.valueOf(date);
H A DTimestamp.java28 * addition to the regular date/time value which has millisecond resolution.
30 * The {@code Timestamp} class consists of a regular date/time value, where only
384 private void format(int date, int digits, StringBuilder sb) { argument
385 String str = String.valueOf(date);
/libcore/luni/src/main/java/java/text/
H A DDateFormat.java30 * An abstract class for date/time formatting subclasses which formats and
31 * parses dates or time in a language-independent manner. The date/time
33 * (i.e., date -> text), parsing (text -> date), and normalization. The date is
37 * DateFormat provides many class methods for obtaining default date/time
47 * To format a date for the current Locale, use one of the static factory
90 * Use {@code getDateInstance} to get the normal date format for a country.
93 * date and time format. You can pass in different options to these factory
133 * representing a date
371 format(Date date) argument
394 format(Date date, StringBuffer buffer, FieldPosition field) argument
[all...]
H A DSimpleDateFormat.java52 * to the ISO 8601 international standard date format.
385 * Changes the pattern of this simple date format to the specified pattern
396 * Changes the pattern of this simple date format to the specified pattern
413 * properties as this simple date format.
429 * Compares the specified object with this simple date format and indicates
436 * @return {@code true} if the specified object is equal to this simple date
454 * Formats the specified object using the rules of this simple date format
456 * date and attributes.
460 * @return an {@code AttributedCharacterIterator} with the formatted date
465 * if the object cannot be formatted by this simple date
483 formatToCharacterIteratorImpl(Date date) argument
528 formatImpl(Date date, StringBuffer buffer, FieldPosition field, List<FieldPosition> fields) argument
816 format(Date date, StringBuffer buffer, FieldPosition fieldPos) argument
1235 set2DigitYearStart(Date date) argument
[all...]
/libcore/luni/src/main/java/javax/security/cert/
H A DX509Certificate.java147 public void checkValidity(Date date)
151 cert.checkValidity(date);
243 * Checks whether the certificate is valid at the specified date.
245 * @param date
246 * the date to check the validity against.
253 public abstract void checkValidity(Date date) argument
342 * Returns the {@code notBefore} date from the validity period of the
350 * Returns the {@code notAfter} date of the validity period of the
/libcore/luni/src/main/java/javax/xml/datatype/
H A DDuration.java96 * <p>Return the name of the XML Schema date/time type that this instance
105 * <i>(timezone is optional for all date/time datatypes)</i>
154 * @throws IllegalStateException If the combination of set fields does not match one of the XML Schema date/time datatypes.
198 + " this Duration does not match one of the XML Schema date/time datatypes:"
534 * The given date is first converted into
546 * @param date
547 * A date object whose value will be modified.
549 * if the date parameter is null.
551 public void addTo(Date date) { argument
554 if (date
[all...]
/libcore/luni/src/main/java/java/util/logging/
H A DXMLFormatter.java52 // format to date
53 String date = MessageFormat.format("{0, date} {0, time}", new Object[] { new Date(time) });
58 append(sb, 1, "date", date);
/libcore/luni/src/test/java/tests/security/cert/
H A DX509CRLSelector2Test.java422 Date date = new Date(200);
423 selector.setDateAndTime(date);
424 assertTrue("The result should be equal to specified.", date
472 Date date = new Date(200);
478 selector.setDateAndTime(date);
498 Date date = new Date(200);
504 selector.setDateAndTime(date);
/libcore/luni/src/main/java/java/net/
H A DHttpCookie.java327 Date date = HttpDate.parse(value);
328 if (date != null) {
329 cookie.setExpires(date);
H A DURLConnection.java330 * Returns the timestamp when this response has been sent as a date in
507 * Returns the specified header value as a date in milliseconds since January
515 * @return the value of the specified header field as a date in
520 String date = getHeaderField(field);
521 if (date == null) {
525 return Date.parse(date); // TODO: use HttpDate.parse()
/libcore/luni/src/main/java/libcore/net/http/
H A DRequestHeaders.java258 public void setIfModifiedSince(Date date) { argument
262 String formattedDate = HttpDate.format(date);
/libcore/luni/src/test/java/tests/java/sql/
H A DSelectFunctionalityTest.java48 private static Date date; field in class:SelectFunctionalityTest
102 date = new Date(currentTime);
159 date.toString(), result.getDate("fdate").toString());
193 prepStatement.setDate(9, date);
220 date.toString(), result.getDate("fdate").toString());

Completed in 429 milliseconds

12