Searched refs:from (Results 51 - 75 of 131) sorted by relevance

123456

/libcore/ojluni/src/test/java/time/tck/java/time/
H A DTestIsoChronology.java45 * may be used to endorse or promote products derived from this software
150 assertEquals(LocalDate.from(isoDate), iso);
280 assertEquals(LocalDate.from(IsoChronology.INSTANCE.dateNow()), LocalDate.now());
H A DTCKPeriod.java45 * may be used to endorse or promote products derived from this software
156 // from(TemporalAmount)
161 assertPeriod(Period.from(amount), 1, 2, 3);
191 assertPeriod(Period.from(amount), 23, 0, 45);
214 Period.from(amount);
244 Period.from(amount);
249 Period.from(ThaiBuddhistChronology.INSTANCE.period(1, 1, 1));
254 Period.from(Duration.ZERO);
259 Period.from(null);
/libcore/ojluni/src/test/java/time/tck/java/time/format/
H A DTCKLocalizedPrinterParser.java45 * may be used to endorse or promote products derived from this software
149 assertEquals(LocalDate.from(parsed), date);
166 // these localized patterns include "z" which isn't available from LocalTime
202 assertEquals(LocalTime.from(parsed), time);
H A DTCKDateTimeFormatterBuilder.java45 * may be used to endorse or promote products derived from this software
114 LocalDate parsed = f.parse("", LocalDate::from); // blank string can be parsed
127 assertEquals(f.parse("2012", LocalDate::from), LocalDate.of(2012, 1, 1));
128 assertEquals(f.parse("2012-6", LocalDate::from), LocalDate.of(2012, 6, 1));
129 assertEquals(f.parse("2012-6-30", LocalDate::from), LocalDate.of(2012, 6, 30));
392 ZoneOffset parsed = f.parse(expected, ZoneOffset::from);
/libcore/ojluni/src/test/java/time/test/java/time/temporal/
H A DTestDateTimeBuilderCombinations.java45 * may be used to endorse or promote products derived from this software
152 assertEquals(parsed.query(LocalDate::from), expectedVal);
155 parsed.query(LocalDate::from);
/libcore/tzdata/update_test_app/src/libcore/tzdata/update_test_app/installupdatetestapp/
H A DMainActivity.java172 private static void copyFile(File from, File to) throws IOException { argument
176 FileInputStream in = new FileInputStream(from);
/libcore/ojluni/src/main/java/java/time/
H A DOffsetDateTime.java47 * may be used to endorse or promote products derived from this software
98 * A date-time with an offset from UTC/Greenwich in the ISO-8601 calendar system,
103 * as well as the offset from UTC/Greenwich. For example, the value
109 * {@code OffsetDateTime} adds to the instant the offset from UTC/Greenwich, which allows
146 * This method differs from the comparison in {@link #compareTo} in that it
188 * The offset from UTC/Greenwich.
194 * Obtains the current date-time from the system clock in the default time-zone.
198 * The offset will be calculated from the time-zone in the clock.
210 * Obtains the current date-time from the system clock in the specified time-zone.
214 * The offset will be calculated from th
348 public static OffsetDateTime from(TemporalAccessor temporal) { method in class:OffsetDateTime
[all...]
H A DInstant.java47 * may be used to endorse or promote products derived from this software
107 * The epoch-seconds are measured from the standard Java epoch of {@code 1970-01-01T00:00:00Z}
131 * of a second from UT1 into whole seconds, known as <i>leap-seconds</i>.
146 * subdivisions, known as seconds. These seconds may differ from the
148 * scale, the definition of which changes from time to time.
166 * For the segment from 1972-11-03 (exact boundary discussed below) until
245 * The number of seconds from the epoch of 1970-01-01T00:00:00Z.
249 * The number of nanoseconds, later along the time-line, from the seconds field.
256 * Obtains the current instant from the system clock.
271 * Obtains the current instant from th
361 public static Instant from(TemporalAccessor temporal) { method in class:Instant
[all...]
H A DPeriod.java47 * may be used to endorse or promote products derived from this software
236 * Obtains an instance of {@code Period} from a temporal amount.
242 * The conversion loops around the set of units from the amount and uses
254 public static Period from(TemporalAmount amount) { method in class:Period
284 * Obtains a {@code Period} from a text string such as {@code PnYnMnD}.
369 * For example, from {@code 2010-01-15} to {@code 2011-03-18} is one year, two months and three days.
609 * Other types are interpreted using {@link Period#from(TemporalAmount)}.
620 Period isoAmount = Period.from(amountToAdd);
698 * Other types are interpreted using {@link Period#from(TemporalAmount)}.
709 Period isoAmount = Period.from(amountToSubtrac
[all...]
H A DZonedDateTime.java47 * may be used to endorse or promote products derived from this software
106 * This class handles conversion from the local time-line of {@code LocalDateTime}
108 * The difference between the two time-lines is the offset from UTC/Greenwich,
112 * {@link ZoneRules rules} accessed from the {@code ZoneId}.
120 * due to the spring daylight savings change from "winter" to "summer".
123 * due to the autumn daylight savings change from "summer" to "winter".
127 * Any method that converts directly or implicitly from a local date-time to an
171 * The offset from UTC/Greenwich.
181 * Obtains the current date-time from the system clock in the default time-zone.
197 * Obtains the current date-time from th
542 public static ZonedDateTime from(TemporalAccessor temporal) { method in class:ZonedDateTime
[all...]
H A DLocalDateTime.java47 * may be used to endorse or promote products derived from this software
163 * Obtains the current date-time from the system clock in the default time-zone.
178 * Obtains the current date-time from the system clock in the specified time-zone.
194 * Obtains the current date-time from the specified clock.
212 * Obtains an instance of {@code LocalDateTime} from year, month,
220 * @param year the year to represent, from MIN_YEAR to MAX_YEAR
222 * @param dayOfMonth the day-of-month to represent, from 1 to 31
223 * @param hour the hour-of-day to represent, from 0 to 23
224 * @param minute the minute-of-hour to represent, from 0 to 59
236 * Obtains an instance of {@code LocalDateTime} from yea
441 public static LocalDateTime from(TemporalAccessor temporal) { method in class:LocalDateTime
[all...]
H A DLocalTime.java47 * may be used to endorse or promote products derived from this software
227 * Obtains the current time from the system clock in the default time-zone.
242 * Obtains the current time from the system clock in the specified time-zone.
258 * Obtains the current time from the specified clock.
279 * Obtains an instance of {@code LocalTime} from an hour and minute.
284 * @param hour the hour-of-day to represent, from 0 to 23
285 * @param minute the minute-of-hour to represent, from 0 to 59
299 * Obtains an instance of {@code LocalTime} from an hour, minute and second.
304 * @param hour the hour-of-day to represent, from 0 to 23
305 * @param minute the minute-of-hour to represent, from
398 public static LocalTime from(TemporalAccessor temporal) { method in class:LocalTime
[all...]
/libcore/ojluni/src/main/java/java/time/temporal/
H A DIsoFields.java42 * may be used to endorse or promote products derived from this software
103 * <li>{@link #DAY_OF_QUARTER DAY_OF_QUARTER} - the day within the quarter, from 1 to 90, 91 or 92
116 * day-of-week from Monday (1) to Sunday (7)
121 * It differs from the standard year in that it always starts on a Monday.
161 * The day-of-quarter has values from 1 to 90 in Q1 of a standard year, from 1 to 91
162 * in Q1 of a leap year, from 1 to 91 in Q2 and from 1 to 92 in Q3 and Q4.
168 * value from 1 to 92. If the quarter has less than 92 days, then day 92, and
171 * In the resolving phase of parsing, a date can be created from
[all...]
H A DWeekFields.java47 * may be used to endorse or promote products derived from this software
104 * that provide access to the values from any {@linkplain Temporal temporal object}.
157 * The first and last weeks of a year may contain days from the
219 * This allows a number of week-based-years to be added to, or subtracted from, a date.
280 * This will look up appropriate values from the provider of localization data.
287 // Android-changed: get Week data from ICU4J
296 * Obtains an instance of {@code WeekFields} from the first day-of-week and minimal days.
300 * in a month or year, starting from the first day-of-week, before the week is counted
310 * @param minimalDaysInFirstWeek the minimal number of days in the first week, from 1 to 7
331 * @param minimalDaysInFirstWeek the minimal number of days in the first week, from
[all...]
H A DTemporalAdjusters.java47 * may be used to endorse or promote products derived from this software
126 * This method allows an adjustment from {@code LocalDate} to {@code LocalDate}
142 LocalDate input = LocalDate.from(temporal);
342 * @param ordinal the week within the month, unbounded but typically from -5 to 5
354 dowDiff += (ordinal - 1L) * 7L; // safe from overflow
363 daysDiff -= (-ordinal - 1L) * 7L; // safe from overflow
/libcore/ojluni/src/main/java/java/util/stream/
H A DSpinedBuffer.java166 // the prior element count from the current spine
482 protected abstract void arrayForEach(T_ARR array, int from, int to, argument
763 int from, int to,
765 for (int i = from; i < to; i++)
777 // the prior element count from the current spine
877 int from, int to,
879 for (int i = from; i < to; i++)
891 // the prior element count from the current spine
993 int from, int to,
995 for (int i = from;
762 arrayForEach(int[] array, int from, int to, IntConsumer consumer) argument
876 arrayForEach(long[] array, int from, int to, LongConsumer consumer) argument
992 arrayForEach(double[] array, int from, int to, DoubleConsumer consumer) argument
[all...]
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
H A DTestUmmAlQuraChronology.java324 public void test_diffBetweenDates(ChronoLocalDate from, ChronoLocalDate to, long days, long months, long years) { argument
325 assertEquals(from.until(to, ChronoUnit.DAYS), days);
326 assertEquals(from.until(to, ChronoUnit.MONTHS), months);
327 assertEquals(from.until(to, ChronoUnit.YEARS), years);
357 // Test to get the adjusted date from a given date using TemporalAdjuster methods
564 // Test to get LocalDate instance from a given HijrahDate
567 assertEquals(LocalDate.from(hijrahDate), iso);
576 // Test to get a HijrahDate from a calendrical
669 assertEquals(HijrahDate.from(accessor), expectedDate);
715 // Test to verify local date time values from variou
[all...]
H A DTestJapaneseChronoImpl.java42 * may be used to endorse or promote products derived from this software
101 // Android-changed: Android doesn't return the Japanese Imperial Calendar from getInstance.
135 OffsetDateTime jodt = OffsetDateTime.of(LocalDate.from(jd), LocalTime.MIN, ZoneOffset.UTC);
/libcore/ojluni/src/main/java/java/time/chrono/
H A DMinguoChronology.java42 * may be used to endorse or promote products derived from this software
90 * <li>year-of-era - The year-of-era for the current era increases uniformly from the epoch at year one.
91 * For the previous era the year increases from one as time goes backwards.
164 * Obtains a local date in Minguo calendar system from the
181 * Obtains a local date in Minguo calendar system from the
196 * Obtains a local date in Minguo calendar system from the
212 * Obtains a local date in Minguo calendar system from the
226 * Obtains a local date in the Minguo calendar system from the epoch-day.
257 return new MinguoDate(LocalDate.from(temporal));
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
H A DTCKChronoZonedDateTime.java42 * may be used to endorse or promote products derived from this software
328 ChronoZonedDateTime<?> test1 = ChronoZonedDateTime.from(dateTime);
334 ChronoZonedDateTime.from(LocalDate.of(2013, 1, 1));
339 ChronoZonedDateTime.from(LocalTime.of(12, 30));
344 ChronoZonedDateTime.from(null);
357 * Construct an adjuster with the Temporal that should be returned from adjust.
395 * Construct an FixedTemporalUnit with the Temporal that should be returned from addTo.
449 * Construct an FixedTemporalField with the Temporal that should be returned from adjustInto.
H A DTCKIsoChronology.java42 * may be used to endorse or promote products derived from this software
93 assertEquals(Chronology.from(LocalDate.of(2012, 6, 30)), IsoChronology.INSTANCE);
98 assertEquals(Chronology.from(new TemporalAccessor() {
122 assertEquals(Chronology.from(new TemporalAccessor() {
145 Chronology.from(null);
/libcore/luni/src/main/java/java/math/
H A DBigInt.java63 void putCopy(BigInt from) { argument
65 NativeBN.BN_copy(this.bignum, from.bignum);
/libcore/ojluni/src/main/java/java/nio/file/attribute/
H A DFileTime.java53 * this {@code FileTime} is converted from an {@code Instant},
65 * The value as Instant (created lazily, if not from an instant)
95 public static FileTime from(long value, TimeUnit unit) { method in class:FileTime
123 public static FileTime from(Instant instant) { method in class:FileTime
131 * <p> Conversion from a coarser granularity that would numerically overflow
163 * <p> Conversion from a coarser granularity that would numerically overflow
222 * from such further time points saturates to {@link Instant#MIN} if
402 * this method deviates from ISO 8601 in the same manner as the
/libcore/luni/src/main/native/
H A Djava_math_NativeBN.cpp118 static void NativeBN_BN_copy(JNIEnv* env, jclass, jlong to, jlong from) { argument
119 if (!twoValidHandles(env, to, from)) return;
120 if (!BN_copy(toBigNum(to), toBigNum(from))) {
/libcore/ojluni/src/main/native/
H A DUNIXProcess_md.c527 * this was imported accidentally from execvp().
574 * specified via the 3rd argument instead of being inherited from environ.
651 * Reads nbyte bytes from file descriptor fd into buf,
698 copyPipe(int from[2], int to[2]) argument
700 to[0] = from[0];
701 to[1] = from[1];
780 return 0; /* Suppress warning "no return value from function" */
811 * very sure to keep stack of child from corrupting stack of parent,

Completed in 450 milliseconds

123456