@sitevision/api 2023.2.2-beta.1 → 2023.2.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/ArraysInstance/index.d.ts +1 -1
- package/server/CollectionsInstance/index.d.ts +1 -1
- package/server/NodeTypeUtil/index.d.ts +1 -1
- package/server/PermissionUtil/index.d.ts +3 -3
- package/server/Properties/index.d.ts +7 -4
- package/server/TagUtil/index.d.ts +1 -1
- package/types/java/io/File/index.d.ts +0 -120
- package/types/java/io/File/index.js +0 -2
- package/types/java/io/PrintStream/index.d.ts +4 -4
- package/types/java/io/PrintWriter/index.d.ts +4 -4
- package/types/java/lang/Boolean/index.d.ts +0 -123
- package/types/java/lang/Boolean/index.js +1 -8
- package/types/java/lang/Class/index.d.ts +9 -97
- package/types/java/lang/Class/index.js +0 -1
- package/types/java/lang/ClassLoader/index.d.ts +0 -91
- package/types/java/lang/ClassLoader/index.js +0 -5
- package/types/java/lang/Double/index.d.ts +0 -541
- package/types/java/lang/Double/index.js +2 -13
- package/types/java/lang/Enum/index.d.ts +0 -23
- package/types/java/lang/Enum/index.js +0 -1
- package/types/java/lang/Float/index.d.ts +0 -494
- package/types/java/lang/Float/index.js +2 -13
- package/types/java/lang/Integer/index.d.ts +0 -780
- package/types/java/lang/Integer/index.js +2 -29
- package/types/java/lang/Long/index.d.ts +0 -788
- package/types/java/lang/Long/index.js +2 -28
- package/types/java/lang/Package/index.d.ts +0 -28
- package/types/java/lang/Package/index.js +0 -2
- package/types/java/lang/String/index.d.ts +0 -193
- package/types/java/lang/String/index.js +0 -4
- package/types/java/lang/reflect/AccessibleObject/index.d.ts +0 -25
- package/types/java/lang/reflect/Constructor/index.d.ts +1 -1
- package/types/java/lang/reflect/Method/index.d.ts +1 -1
- package/types/java/math/BigDecimal/index.d.ts +1 -40
- package/types/java/math/BigDecimal/index.js +0 -1
- package/types/java/math/BigInteger/index.d.ts +0 -25
- package/types/java/math/BigInteger/index.js +0 -2
- package/types/java/net/InetAddress/index.d.ts +0 -134
- package/types/java/net/InetAddress/index.js +1 -6
- package/types/java/net/NetworkInterface/index.d.ts +0 -50
- package/types/java/net/NetworkInterface/index.js +0 -4
- package/types/java/net/URI/index.d.ts +0 -22
- package/types/java/net/URI/index.js +0 -1
- package/types/java/net/URL/index.d.ts +0 -23
- package/types/java/net/URL/index.js +1 -2
- package/types/java/net/URLConnection/index.d.ts +0 -125
- package/types/java/net/URLConnection/index.js +1 -10
- package/types/java/nio/channels/AsynchronousFileChannel/index.d.ts +0 -136
- package/types/java/nio/channels/AsynchronousFileChannel/index.js +0 -1
- package/types/java/nio/channels/FileChannel/index.d.ts +0 -128
- package/types/java/nio/channels/FileChannel/index.js +0 -1
- package/types/java/nio/charset/Charset/index.d.ts +1 -58
- package/types/java/nio/charset/Charset/index.js +0 -4
- package/types/java/nio/file/FileSystem/index.d.ts +1 -1
- package/types/java/nio/file/Path/index.d.ts +3 -3
- package/types/java/nio/file/Watchable/index.d.ts +2 -2
- package/types/java/nio/file/spi/FileSystemProvider/index.d.ts +18 -26
- package/types/java/nio/file/spi/FileSystemProvider/index.js +0 -1
- package/types/java/text/DateFormat/index.d.ts +0 -130
- package/types/java/text/DateFormat/index.js +0 -5
- package/types/java/text/DateFormatSymbols/index.d.ts +7 -52
- package/types/java/text/DateFormatSymbols/index.js +0 -2
- package/types/java/text/NumberFormat/index.d.ts +0 -123
- package/types/java/text/NumberFormat/index.js +0 -6
- package/types/java/time/Clock/index.d.ts +1 -162
- package/types/java/time/Clock/index.js +0 -8
- package/types/java/time/Duration/index.d.ts +3 -193
- package/types/java/time/Duration/index.js +0 -10
- package/types/java/time/Instant/index.d.ts +0 -101
- package/types/java/time/Instant/index.js +0 -5
- package/types/java/time/LocalDate/index.d.ts +4 -134
- package/types/java/time/LocalDate/index.js +0 -6
- package/types/java/time/LocalDateTime/index.d.ts +7 -285
- package/types/java/time/LocalDateTime/index.js +0 -6
- package/types/java/time/LocalTime/index.d.ts +2 -146
- package/types/java/time/LocalTime/index.js +0 -6
- package/types/java/time/OffsetDateTime/index.d.ts +7 -177
- package/types/java/time/OffsetDateTime/index.js +0 -6
- package/types/java/time/OffsetTime/index.d.ts +3 -141
- package/types/java/time/OffsetTime/index.js +0 -5
- package/types/java/time/Period/index.d.ts +1 -135
- package/types/java/time/Period/index.js +0 -8
- package/types/java/time/ZoneId/index.d.ts +1 -121
- package/types/java/time/ZoneId/index.js +0 -5
- package/types/java/time/ZoneOffset/index.d.ts +1 -104
- package/types/java/time/ZoneOffset/index.js +0 -6
- package/types/java/time/ZonedDateTime/index.d.ts +6 -284
- package/types/java/time/ZonedDateTime/index.js +0 -7
- package/types/java/time/format/DateTimeFormatter/index.d.ts +4 -217
- package/types/java/time/format/DateTimeFormatter/index.js +0 -6
- package/types/java/time/format/DecimalStyle/index.d.ts +0 -34
- package/types/java/time/format/DecimalStyle/index.js +0 -3
- package/types/java/time/temporal/ValueRange/index.d.ts +0 -43
- package/types/java/time/temporal/ValueRange/index.js +0 -1
- package/types/java/time/zone/ZoneOffsetTransition/index.d.ts +2 -19
- package/types/java/time/zone/ZoneOffsetTransition/index.js +0 -1
- package/types/java/time/zone/ZoneRules/index.d.ts +2 -28
- package/types/java/time/zone/ZoneRules/index.js +0 -1
- package/types/java/util/Calendar/index.d.ts +2 -67
- package/types/java/util/Calendar/index.js +0 -3
- package/types/java/util/Comparator/index.d.ts +16 -16
- package/types/java/util/Currency/index.d.ts +0 -38
- package/types/java/util/Currency/index.js +0 -2
- package/types/java/util/Date/index.d.ts +0 -160
- package/types/java/util/Date/index.js +0 -3
- package/types/java/util/Locale/index.d.ts +0 -344
- package/types/java/util/Locale/index.js +1 -11
- package/types/java/util/Optional/index.d.ts +0 -27
- package/types/java/util/Optional/index.js +0 -3
- package/types/java/util/OptionalDouble/index.d.ts +0 -15
- package/types/java/util/OptionalDouble/index.js +0 -2
- package/types/java/util/OptionalInt/index.d.ts +0 -15
- package/types/java/util/OptionalInt/index.js +0 -2
- package/types/java/util/OptionalLong/index.d.ts +0 -15
- package/types/java/util/OptionalLong/index.js +0 -2
- package/types/java/util/TimeZone/index.d.ts +0 -65
- package/types/java/util/TimeZone/index.js +0 -4
- package/types/java/util/stream/Collector/index.d.ts +2 -2
- package/types/java/util/stream/DoubleStream/index.d.ts +1 -1
- package/types/java/util/stream/IntStream/index.d.ts +1 -1
- package/types/java/util/stream/LongStream/index.d.ts +1 -1
- package/types/java/util/stream/Stream/index.d.ts +1 -1
- package/types/javax/jcr/PropertyType/index.d.ts +2 -18
- package/types/javax/jcr/PropertyType/index.js +1 -4
- package/types/javax/jcr/nodetype/NodeDefinitionTemplate/index.d.ts +1 -1
- package/types/javax/jcr/nodetype/NodeTypeTemplate/index.d.ts +1 -1
- package/types/javax/jcr/nodetype/PropertyDefinitionTemplate/index.d.ts +2 -2
- package/types/javax/jcr/observation/ObservationManager/index.d.ts +4 -4
- package/types/javax/jcr/version/OnParentVersionAction/index.d.ts +2 -19
- package/types/javax/jcr/version/OnParentVersionAction/index.js +1 -4
- package/types/java/net/ContentHandler/index.d.ts +0 -70
- package/types/java/net/ContentHandler/index.js +0 -10
- package/types/java/net/ContentHandlerFactory/index.d.ts +0 -26
- package/types/java/net/ContentHandlerFactory/index.js +0 -10
- package/types/java/net/FileNameMap/index.d.ts +0 -16
- package/types/java/net/FileNameMap/index.js +0 -10
- package/types/java/net/URLStreamHandler/index.d.ts +0 -199
- package/types/java/net/URLStreamHandler/index.js +0 -19
- package/types/java/net/URLStreamHandlerFactory/index.d.ts +0 -24
- package/types/java/net/URLStreamHandlerFactory/index.js +0 -10
- package/types/java/time/format/FormatStyle/index.d.ts +0 -14
- package/types/java/time/format/FormatStyle/index.js +0 -13
- package/types/java/util/Locale.Category/index.d.ts +0 -12
- package/types/java/util/Locale.Category/index.js +0 -11
- package/types/java/util/Locale.FilteringMode/index.d.ts +0 -97
- package/types/java/util/Locale.FilteringMode/index.js +0 -14
|
@@ -6,8 +6,6 @@ import type { ParsePosition } from "../ParsePosition";
|
|
|
6
6
|
|
|
7
7
|
import type { Number } from "../../lang/Number";
|
|
8
8
|
|
|
9
|
-
import type { Locale } from "../../util/Locale";
|
|
10
|
-
|
|
11
9
|
import type { Currency } from "../../util/Currency";
|
|
12
10
|
import type { RoundingMode } from "../../math/RoundingMode";
|
|
13
11
|
import type { Format } from "../Format";
|
|
@@ -282,127 +280,6 @@ export type NumberFormat = Format & {
|
|
|
282
280
|
*/
|
|
283
281
|
setParseIntegerOnly(value: boolean): void;
|
|
284
282
|
|
|
285
|
-
/**
|
|
286
|
-
* Returns a general-purpose number format for the current default
|
|
287
|
-
* {@link java.util.Locale.Category#FORMAT FORMAT} locale.
|
|
288
|
-
* This is the same as calling
|
|
289
|
-
* {@link #getNumberInstance() getNumberInstance()}.
|
|
290
|
-
* @return the {@code NumberFormat} instance for general-purpose number
 formatting
|
|
291
|
-
*/
|
|
292
|
-
getInstance(): NumberFormat;
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* Returns a general-purpose number format for the specified locale.
|
|
296
|
-
* This is the same as calling
|
|
297
|
-
* {@link #getNumberInstance(java.util.Locale) getNumberInstance(inLocale)}.
|
|
298
|
-
* @param inLocale the desired locale
|
|
299
|
-
* @return the {@code NumberFormat} instance for general-purpose number
 formatting
|
|
300
|
-
*/
|
|
301
|
-
getInstance(inLocale: Locale): NumberFormat;
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* Returns a general-purpose number format for the current default
|
|
305
|
-
* {@link java.util.Locale.Category#FORMAT FORMAT} locale.
|
|
306
|
-
* <p>This is equivalent to calling
|
|
307
|
-
* {@link #getNumberInstance(Locale)
|
|
308
|
-
* getNumberInstance(Locale.getDefault(Locale.Category.FORMAT))}.
|
|
309
|
-
* @return the {@code NumberFormat} instance for general-purpose number
 formatting
|
|
310
|
-
* @see java.util.Locale#getDefault(java.util.Locale.Category)
|
|
311
|
-
* @see java.util.Locale.Category#FORMAT
|
|
312
|
-
*/
|
|
313
|
-
getNumberInstance(): NumberFormat;
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Returns a general-purpose number format for the specified locale.
|
|
317
|
-
* @param inLocale the desired locale
|
|
318
|
-
* @return the {@code NumberFormat} instance for general-purpose number
 formatting
|
|
319
|
-
*/
|
|
320
|
-
getNumberInstance(inLocale: Locale): NumberFormat;
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Returns an integer number format for the current default
|
|
324
|
-
* {@link java.util.Locale.Category#FORMAT FORMAT} locale. The
|
|
325
|
-
* returned number format is configured to round floating point numbers
|
|
326
|
-
* to the nearest integer using half-even rounding (see {@link
|
|
327
|
-
* java.math.RoundingMode#HALF_EVEN RoundingMode.HALF_EVEN}) for formatting,
|
|
328
|
-
* and to parse only the integer part of an input string (see {@link
|
|
329
|
-
* #isParseIntegerOnly isParseIntegerOnly}).
|
|
330
|
-
* <p>This is equivalent to calling
|
|
331
|
-
* {@link #getIntegerInstance(Locale)
|
|
332
|
-
* getIntegerInstance(Locale.getDefault(Locale.Category.FORMAT))}.
|
|
333
|
-
* @see #getRoundingMode()
|
|
334
|
-
* @see java.util.Locale#getDefault(java.util.Locale.Category)
|
|
335
|
-
* @see java.util.Locale.Category#FORMAT
|
|
336
|
-
* @return a number format for integer values
|
|
337
|
-
* @since 1.4
|
|
338
|
-
*/
|
|
339
|
-
getIntegerInstance(): NumberFormat;
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Returns an integer number format for the specified locale. The
|
|
343
|
-
* returned number format is configured to round floating point numbers
|
|
344
|
-
* to the nearest integer using half-even rounding (see {@link
|
|
345
|
-
* java.math.RoundingMode#HALF_EVEN RoundingMode.HALF_EVEN}) for formatting,
|
|
346
|
-
* and to parse only the integer part of an input string (see {@link
|
|
347
|
-
* #isParseIntegerOnly isParseIntegerOnly}).
|
|
348
|
-
* @param inLocale the desired locale
|
|
349
|
-
* @see #getRoundingMode()
|
|
350
|
-
* @return a number format for integer values
|
|
351
|
-
* @since 1.4
|
|
352
|
-
*/
|
|
353
|
-
getIntegerInstance(inLocale: Locale): NumberFormat;
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* Returns a currency format for the current default
|
|
357
|
-
* {@link java.util.Locale.Category#FORMAT FORMAT} locale.
|
|
358
|
-
* <p>This is equivalent to calling
|
|
359
|
-
* {@link #getCurrencyInstance(Locale)
|
|
360
|
-
* getCurrencyInstance(Locale.getDefault(Locale.Category.FORMAT))}.
|
|
361
|
-
* @return the {@code NumberFormat} instance for currency formatting
|
|
362
|
-
* @see java.util.Locale#getDefault(java.util.Locale.Category)
|
|
363
|
-
* @see java.util.Locale.Category#FORMAT
|
|
364
|
-
*/
|
|
365
|
-
getCurrencyInstance(): NumberFormat;
|
|
366
|
-
|
|
367
|
-
/**
|
|
368
|
-
* Returns a currency format for the specified locale.
|
|
369
|
-
* @param inLocale the desired locale
|
|
370
|
-
* @return the {@code NumberFormat} instance for currency formatting
|
|
371
|
-
*/
|
|
372
|
-
getCurrencyInstance(inLocale: Locale): NumberFormat;
|
|
373
|
-
|
|
374
|
-
/**
|
|
375
|
-
* Returns a percentage format for the current default
|
|
376
|
-
* {@link java.util.Locale.Category#FORMAT FORMAT} locale.
|
|
377
|
-
* <p>This is equivalent to calling
|
|
378
|
-
* {@link #getPercentInstance(Locale)
|
|
379
|
-
* getPercentInstance(Locale.getDefault(Locale.Category.FORMAT))}.
|
|
380
|
-
* @return the {@code NumberFormat} instance for percentage formatting
|
|
381
|
-
* @see java.util.Locale#getDefault(java.util.Locale.Category)
|
|
382
|
-
* @see java.util.Locale.Category#FORMAT
|
|
383
|
-
*/
|
|
384
|
-
getPercentInstance(): NumberFormat;
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* Returns a percentage format for the specified locale.
|
|
388
|
-
* @param inLocale the desired locale
|
|
389
|
-
* @return the {@code NumberFormat} instance for percentage formatting
|
|
390
|
-
*/
|
|
391
|
-
getPercentInstance(inLocale: Locale): NumberFormat;
|
|
392
|
-
|
|
393
|
-
/**
|
|
394
|
-
* Returns an array of all locales for which the
|
|
395
|
-
* <code>get*Instance</code> methods of this class can return
|
|
396
|
-
* localized instances.
|
|
397
|
-
* The returned array represents the union of locales supported by the Java
|
|
398
|
-
* runtime and by installed
|
|
399
|
-
* {@link java.text.spi.NumberFormatProvider NumberFormatProvider} implementations.
|
|
400
|
-
* It must contain at least a <code>Locale</code> instance equal to
|
|
401
|
-
* {@link java.util.Locale#US Locale.US}.
|
|
402
|
-
* @return An array of locales for which localized
 <code>NumberFormat</code> instances are available.
|
|
403
|
-
*/
|
|
404
|
-
getAvailableLocales(): Locale;
|
|
405
|
-
|
|
406
283
|
/**
|
|
407
284
|
* Overrides hashCode.
|
|
408
285
|
|
|
@@ -10,12 +10,6 @@ var _default = {
|
|
|
10
10
|
parse: function parse() {},
|
|
11
11
|
isParseIntegerOnly: function isParseIntegerOnly() {},
|
|
12
12
|
setParseIntegerOnly: function setParseIntegerOnly() {},
|
|
13
|
-
getInstance: function getInstance() {},
|
|
14
|
-
getNumberInstance: function getNumberInstance() {},
|
|
15
|
-
getIntegerInstance: function getIntegerInstance() {},
|
|
16
|
-
getCurrencyInstance: function getCurrencyInstance() {},
|
|
17
|
-
getPercentInstance: function getPercentInstance() {},
|
|
18
|
-
getAvailableLocales: function getAvailableLocales() {},
|
|
19
13
|
hashCode: function hashCode() {},
|
|
20
14
|
equals: function equals() {},
|
|
21
15
|
clone: function clone() {},
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ZoneId } from "../ZoneId";
|
|
2
|
-
import type { Duration } from "../Duration";
|
|
3
|
-
import type { Instant } from "../Instant";
|
|
4
2
|
|
|
3
|
+
import type { Instant } from "../Instant";
|
|
5
4
|
import type { Object } from "../../lang/Object";
|
|
6
5
|
|
|
7
6
|
/**
|
|
@@ -43,166 +42,6 @@ import type { Object } from "../../lang/Object";
|
|
|
43
42
|
* @since 1.8
|
|
44
43
|
*/
|
|
45
44
|
export type Clock = Object & {
|
|
46
|
-
/**
|
|
47
|
-
* Obtains a clock that returns the current instant using the best available
|
|
48
|
-
* system clock, converting to date and time using the UTC time-zone.
|
|
49
|
-
* <p>
|
|
50
|
-
* This clock, rather than {@link #systemDefaultZone()}, should be used when
|
|
51
|
-
* you need the current instant without the date or time.
|
|
52
|
-
* <p>
|
|
53
|
-
* This clock is based on the best available system clock.
|
|
54
|
-
* This may use {@link System#currentTimeMillis()}, or a higher resolution
|
|
55
|
-
* clock if one is available.
|
|
56
|
-
* <p>
|
|
57
|
-
* Conversion from instant to date or time uses the {@linkplain ZoneOffset#UTC UTC time-zone}.
|
|
58
|
-
* <p>
|
|
59
|
-
* The returned implementation is immutable, thread-safe and {@code Serializable}.
|
|
60
|
-
* It is equivalent to {@code system(ZoneOffset.UTC)}.
|
|
61
|
-
* @return a clock that uses the best available system clock in the UTC zone, not null
|
|
62
|
-
*/
|
|
63
|
-
systemUTC(): Clock;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Obtains a clock that returns the current instant using the best available
|
|
67
|
-
* system clock, converting to date and time using the default time-zone.
|
|
68
|
-
* <p>
|
|
69
|
-
* This clock is based on the best available system clock.
|
|
70
|
-
* This may use {@link System#currentTimeMillis()}, or a higher resolution
|
|
71
|
-
* clock if one is available.
|
|
72
|
-
* <p>
|
|
73
|
-
* Using this method hard codes a dependency to the default time-zone into your application.
|
|
74
|
-
* It is recommended to avoid this and use a specific time-zone whenever possible.
|
|
75
|
-
* The {@link #systemUTC() UTC clock} should be used when you need the current instant
|
|
76
|
-
* without the date or time.
|
|
77
|
-
* <p>
|
|
78
|
-
* The returned implementation is immutable, thread-safe and {@code Serializable}.
|
|
79
|
-
* It is equivalent to {@code system(ZoneId.systemDefault())}.
|
|
80
|
-
* @return a clock that uses the best available system clock in the default zone, not null
|
|
81
|
-
* @see ZoneId#systemDefault()
|
|
82
|
-
*/
|
|
83
|
-
systemDefaultZone(): Clock;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Obtains a clock that returns the current instant using best available
|
|
87
|
-
* system clock.
|
|
88
|
-
* <p>
|
|
89
|
-
* This clock is based on the best available system clock.
|
|
90
|
-
* This may use {@link System#currentTimeMillis()}, or a higher resolution
|
|
91
|
-
* clock if one is available.
|
|
92
|
-
* <p>
|
|
93
|
-
* Conversion from instant to date or time uses the specified time-zone.
|
|
94
|
-
* <p>
|
|
95
|
-
* The returned implementation is immutable, thread-safe and {@code Serializable}.
|
|
96
|
-
* @param zone the time-zone to use to convert the instant to date-time, not null
|
|
97
|
-
* @return a clock that uses the best available system clock in the specified zone, not null
|
|
98
|
-
*/
|
|
99
|
-
system(zone: ZoneId): Clock;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Obtains a clock that returns the current instant ticking in whole seconds
|
|
103
|
-
* using best available system clock.
|
|
104
|
-
* <p>
|
|
105
|
-
* This clock will always have the nano-of-second field set to zero.
|
|
106
|
-
* This ensures that the visible time ticks in whole seconds.
|
|
107
|
-
* The underlying clock is the best available system clock, equivalent to
|
|
108
|
-
* using {@link #system(ZoneId)}.
|
|
109
|
-
* <p>
|
|
110
|
-
* Implementations may use a caching strategy for performance reasons.
|
|
111
|
-
* As such, it is possible that the start of the second observed via this
|
|
112
|
-
* clock will be later than that observed directly via the underlying clock.
|
|
113
|
-
* <p>
|
|
114
|
-
* The returned implementation is immutable, thread-safe and {@code Serializable}.
|
|
115
|
-
* It is equivalent to {@code tick(system(zone), Duration.ofSeconds(1))}.
|
|
116
|
-
* @param zone the time-zone to use to convert the instant to date-time, not null
|
|
117
|
-
* @return a clock that ticks in whole seconds using the specified zone, not null
|
|
118
|
-
*/
|
|
119
|
-
tickSeconds(zone: ZoneId): Clock;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Obtains a clock that returns the current instant ticking in whole minutes
|
|
123
|
-
* using best available system clock.
|
|
124
|
-
* <p>
|
|
125
|
-
* This clock will always have the nano-of-second and second-of-minute fields set to zero.
|
|
126
|
-
* This ensures that the visible time ticks in whole minutes.
|
|
127
|
-
* The underlying clock is the best available system clock, equivalent to
|
|
128
|
-
* using {@link #system(ZoneId)}.
|
|
129
|
-
* <p>
|
|
130
|
-
* Implementations may use a caching strategy for performance reasons.
|
|
131
|
-
* As such, it is possible that the start of the minute observed via this
|
|
132
|
-
* clock will be later than that observed directly via the underlying clock.
|
|
133
|
-
* <p>
|
|
134
|
-
* The returned implementation is immutable, thread-safe and {@code Serializable}.
|
|
135
|
-
* It is equivalent to {@code tick(system(zone), Duration.ofMinutes(1))}.
|
|
136
|
-
* @param zone the time-zone to use to convert the instant to date-time, not null
|
|
137
|
-
* @return a clock that ticks in whole minutes using the specified zone, not null
|
|
138
|
-
*/
|
|
139
|
-
tickMinutes(zone: ZoneId): Clock;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Obtains a clock that returns instants from the specified clock truncated
|
|
143
|
-
* to the nearest occurrence of the specified duration.
|
|
144
|
-
* <p>
|
|
145
|
-
* This clock will only tick as per the specified duration. Thus, if the duration
|
|
146
|
-
* is half a second, the clock will return instants truncated to the half second.
|
|
147
|
-
* <p>
|
|
148
|
-
* The tick duration must be positive. If it has a part smaller than a whole
|
|
149
|
-
* millisecond, then the whole duration must divide into one second without
|
|
150
|
-
* leaving a remainder. All normal tick durations will match these criteria,
|
|
151
|
-
* including any multiple of hours, minutes, seconds and milliseconds, and
|
|
152
|
-
* sensible nanosecond durations, such as 20ns, 250,000ns and 500,000ns.
|
|
153
|
-
* <p>
|
|
154
|
-
* A duration of zero or one nanosecond would have no truncation effect.
|
|
155
|
-
* Passing one of these will return the underlying clock.
|
|
156
|
-
* <p>
|
|
157
|
-
* Implementations may use a caching strategy for performance reasons.
|
|
158
|
-
* As such, it is possible that the start of the requested duration observed
|
|
159
|
-
* via this clock will be later than that observed directly via the underlying clock.
|
|
160
|
-
* <p>
|
|
161
|
-
* The returned implementation is immutable, thread-safe and {@code Serializable}
|
|
162
|
-
* providing that the base clock is.
|
|
163
|
-
* @param baseClock the base clock to base the ticking clock on, not null
|
|
164
|
-
* @param tickDuration the duration of each visible tick, not negative, not null
|
|
165
|
-
* @return a clock that ticks in whole units of the duration, not null
|
|
166
|
-
* @throws IllegalArgumentException if the duration is negative, or has a
 part smaller than a whole millisecond such that the whole duration is not
 divisible into one second
|
|
167
|
-
* @throws ArithmeticException if the duration is too large to be represented as nanos
|
|
168
|
-
*/
|
|
169
|
-
tick(baseClock: Clock, tickDuration: Duration): Clock;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Obtains a clock that always returns the same instant.
|
|
173
|
-
* <p>
|
|
174
|
-
* This clock simply returns the specified instant.
|
|
175
|
-
* As such, it is not a clock in the conventional sense.
|
|
176
|
-
* The main use case for this is in testing, where the fixed clock ensures
|
|
177
|
-
* tests are not dependent on the current clock.
|
|
178
|
-
* <p>
|
|
179
|
-
* The returned implementation is immutable, thread-safe and {@code Serializable}.
|
|
180
|
-
* @param fixedInstant the instant to use as the clock, not null
|
|
181
|
-
* @param zone the time-zone to use to convert the instant to date-time, not null
|
|
182
|
-
* @return a clock that always returns the same instant, not null
|
|
183
|
-
*/
|
|
184
|
-
fixed(fixedInstant: Instant, zone: ZoneId): Clock;
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Obtains a clock that returns instants from the specified clock with the
|
|
188
|
-
* specified duration added
|
|
189
|
-
* <p>
|
|
190
|
-
* This clock wraps another clock, returning instants that are later by the
|
|
191
|
-
* specified duration. If the duration is negative, the instants will be
|
|
192
|
-
* earlier than the current date and time.
|
|
193
|
-
* The main use case for this is to simulate running in the future or in the past.
|
|
194
|
-
* <p>
|
|
195
|
-
* A duration of zero would have no offsetting effect.
|
|
196
|
-
* Passing zero will return the underlying clock.
|
|
197
|
-
* <p>
|
|
198
|
-
* The returned implementation is immutable, thread-safe and {@code Serializable}
|
|
199
|
-
* providing that the base clock is.
|
|
200
|
-
* @param baseClock the base clock to add the duration to, not null
|
|
201
|
-
* @param offsetDuration the duration to add, not null
|
|
202
|
-
* @return a clock based on the base clock with the duration added, not null
|
|
203
|
-
*/
|
|
204
|
-
offset(baseClock: Clock, offsetDuration: Duration): Clock;
|
|
205
|
-
|
|
206
45
|
/**
|
|
207
46
|
* Gets the time-zone being used to create dates and times.
|
|
208
47
|
* <p>
|
|
@@ -5,14 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _default = {
|
|
8
|
-
systemUTC: function systemUTC() {},
|
|
9
|
-
systemDefaultZone: function systemDefaultZone() {},
|
|
10
|
-
system: function system() {},
|
|
11
|
-
tickSeconds: function tickSeconds() {},
|
|
12
|
-
tickMinutes: function tickMinutes() {},
|
|
13
|
-
tick: function tick() {},
|
|
14
|
-
fixed: function fixed() {},
|
|
15
|
-
offset: function offset() {},
|
|
16
8
|
getZone: function getZone() {},
|
|
17
9
|
withZone: function withZone() {},
|
|
18
10
|
millis: function millis() {},
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { TemporalUnit } from "../temporal/TemporalUnit";
|
|
2
|
-
|
|
3
|
-
import type { CharSequence } from "../../lang/CharSequence";
|
|
4
|
-
import type { Temporal } from "../temporal/Temporal";
|
|
2
|
+
|
|
5
3
|
import type { List } from "../../util/List";
|
|
6
4
|
|
|
5
|
+
import type { Temporal } from "../temporal/Temporal";
|
|
7
6
|
import type { Object } from "../../lang/Object";
|
|
8
7
|
import type { String } from "../../lang/String";
|
|
8
|
+
import type { TemporalAmount } from "../temporal/TemporalAmount";
|
|
9
9
|
import type { Comparable } from "../../lang/Comparable";
|
|
10
10
|
import type { Serializable } from "../../io/Serializable";
|
|
11
11
|
|
|
@@ -47,196 +47,6 @@ export type Duration = Object &
|
|
|
47
47
|
TemporalAmount &
|
|
48
48
|
Comparable &
|
|
49
49
|
Serializable & {
|
|
50
|
-
/**
|
|
51
|
-
* Obtains a {@code Duration} representing a number of standard 24 hour days.
|
|
52
|
-
* <p>
|
|
53
|
-
* The seconds are calculated based on the standard definition of a day,
|
|
54
|
-
* where each day is 86400 seconds which implies a 24 hour day.
|
|
55
|
-
* The nanosecond in second field is set to zero.
|
|
56
|
-
* @param days the number of days, positive or negative
|
|
57
|
-
* @return a {@code Duration}, not null
|
|
58
|
-
* @throws ArithmeticException if the input days exceeds the capacity of {@code Duration}
|
|
59
|
-
*/
|
|
60
|
-
ofDays(days: number): Duration;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Obtains a {@code Duration} representing a number of standard hours.
|
|
64
|
-
* <p>
|
|
65
|
-
* The seconds are calculated based on the standard definition of an hour,
|
|
66
|
-
* where each hour is 3600 seconds.
|
|
67
|
-
* The nanosecond in second field is set to zero.
|
|
68
|
-
* @param hours the number of hours, positive or negative
|
|
69
|
-
* @return a {@code Duration}, not null
|
|
70
|
-
* @throws ArithmeticException if the input hours exceeds the capacity of {@code Duration}
|
|
71
|
-
*/
|
|
72
|
-
ofHours(hours: number): Duration;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Obtains a {@code Duration} representing a number of standard minutes.
|
|
76
|
-
* <p>
|
|
77
|
-
* The seconds are calculated based on the standard definition of a minute,
|
|
78
|
-
* where each minute is 60 seconds.
|
|
79
|
-
* The nanosecond in second field is set to zero.
|
|
80
|
-
* @param minutes the number of minutes, positive or negative
|
|
81
|
-
* @return a {@code Duration}, not null
|
|
82
|
-
* @throws ArithmeticException if the input minutes exceeds the capacity of {@code Duration}
|
|
83
|
-
*/
|
|
84
|
-
ofMinutes(minutes: number): Duration;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Obtains a {@code Duration} representing a number of seconds.
|
|
88
|
-
* <p>
|
|
89
|
-
* The nanosecond in second field is set to zero.
|
|
90
|
-
* @param seconds the number of seconds, positive or negative
|
|
91
|
-
* @return a {@code Duration}, not null
|
|
92
|
-
*/
|
|
93
|
-
ofSeconds(seconds: number): Duration;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Obtains a {@code Duration} representing a number of seconds and an
|
|
97
|
-
* adjustment in nanoseconds.
|
|
98
|
-
* <p>
|
|
99
|
-
* This method allows an arbitrary number of nanoseconds to be passed in.
|
|
100
|
-
* The factory will alter the values of the second and nanosecond in order
|
|
101
|
-
* to ensure that the stored nanosecond is in the range 0 to 999,999,999.
|
|
102
|
-
* For example, the following will result in the exactly the same duration:
|
|
103
|
-
* <pre>
|
|
104
|
-
* Duration.ofSeconds(3, 1);
|
|
105
|
-
* Duration.ofSeconds(4, -999_999_999);
|
|
106
|
-
* Duration.ofSeconds(2, 1000_000_001);
|
|
107
|
-
* </pre>
|
|
108
|
-
* @param seconds the number of seconds, positive or negative
|
|
109
|
-
* @param nanoAdjustment the nanosecond adjustment to the number of seconds, positive or negative
|
|
110
|
-
* @return a {@code Duration}, not null
|
|
111
|
-
* @throws ArithmeticException if the adjustment causes the seconds to exceed the capacity of {@code Duration}
|
|
112
|
-
*/
|
|
113
|
-
ofSeconds(seconds: number, nanoAdjustment: number): Duration;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Obtains a {@code Duration} representing a number of milliseconds.
|
|
117
|
-
* <p>
|
|
118
|
-
* The seconds and nanoseconds are extracted from the specified milliseconds.
|
|
119
|
-
* @param millis the number of milliseconds, positive or negative
|
|
120
|
-
* @return a {@code Duration}, not null
|
|
121
|
-
*/
|
|
122
|
-
ofMillis(millis: number): Duration;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Obtains a {@code Duration} representing a number of nanoseconds.
|
|
126
|
-
* <p>
|
|
127
|
-
* The seconds and nanoseconds are extracted from the specified nanoseconds.
|
|
128
|
-
* @param nanos the number of nanoseconds, positive or negative
|
|
129
|
-
* @return a {@code Duration}, not null
|
|
130
|
-
*/
|
|
131
|
-
ofNanos(nanos: number): Duration;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Obtains a {@code Duration} representing an amount in the specified unit.
|
|
135
|
-
* <p>
|
|
136
|
-
* The parameters represent the two parts of a phrase like '6 Hours'. For example:
|
|
137
|
-
* <pre>
|
|
138
|
-
* Duration.of(3, SECONDS);
|
|
139
|
-
* Duration.of(465, HOURS);
|
|
140
|
-
* </pre>
|
|
141
|
-
* Only a subset of units are accepted by this method.
|
|
142
|
-
* The unit must either have an {@linkplain TemporalUnit#isDurationEstimated() exact duration} or
|
|
143
|
-
* be {@link ChronoUnit#DAYS} which is treated as 24 hours. Other units throw an exception.
|
|
144
|
-
* @param amount the amount of the duration, measured in terms of the unit, positive or negative
|
|
145
|
-
* @param unit the unit that the duration is measured in, must have an exact duration, not null
|
|
146
|
-
* @return a {@code Duration}, not null
|
|
147
|
-
* @throws DateTimeException if the period unit has an estimated duration
|
|
148
|
-
* @throws ArithmeticException if a numeric overflow occurs
|
|
149
|
-
*/
|
|
150
|
-
of(amount: number, unit: TemporalUnit): Duration;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Obtains an instance of {@code Duration} from a temporal amount.
|
|
154
|
-
* <p>
|
|
155
|
-
* This obtains a duration based on the specified amount.
|
|
156
|
-
* A {@code TemporalAmount} represents an amount of time, which may be
|
|
157
|
-
* date-based or time-based, which this factory extracts to a duration.
|
|
158
|
-
* <p>
|
|
159
|
-
* The conversion loops around the set of units from the amount and uses
|
|
160
|
-
* the {@linkplain TemporalUnit#getDuration() duration} of the unit to
|
|
161
|
-
* calculate the total {@code Duration}.
|
|
162
|
-
* Only a subset of units are accepted by this method. The unit must either
|
|
163
|
-
* have an {@linkplain TemporalUnit#isDurationEstimated() exact duration}
|
|
164
|
-
* or be {@link ChronoUnit#DAYS} which is treated as 24 hours.
|
|
165
|
-
* If any other units are found then an exception is thrown.
|
|
166
|
-
* @param amount the temporal amount to convert, not null
|
|
167
|
-
* @return the equivalent duration, not null
|
|
168
|
-
* @throws DateTimeException if unable to convert to a {@code Duration}
|
|
169
|
-
* @throws ArithmeticException if numeric overflow occurs
|
|
170
|
-
*/
|
|
171
|
-
from(amount: TemporalAmount): Duration;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Obtains a {@code Duration} from a text string such as {@code PnDTnHnMn.nS}.
|
|
175
|
-
* <p>
|
|
176
|
-
* This will parse a textual representation of a duration, including the
|
|
177
|
-
* string produced by {@code toString()}. The formats accepted are based
|
|
178
|
-
* on the ISO-8601 duration format {@code PnDTnHnMn.nS} with days
|
|
179
|
-
* considered to be exactly 24 hours.
|
|
180
|
-
* <p>
|
|
181
|
-
* The string starts with an optional sign, denoted by the ASCII negative
|
|
182
|
-
* or positive symbol. If negative, the whole period is negated.
|
|
183
|
-
* The ASCII letter "P" is next in upper or lower case.
|
|
184
|
-
* There are then four sections, each consisting of a number and a suffix.
|
|
185
|
-
* The sections have suffixes in ASCII of "D", "H", "M" and "S" for
|
|
186
|
-
* days, hours, minutes and seconds, accepted in upper or lower case.
|
|
187
|
-
* The suffixes must occur in order. The ASCII letter "T" must occur before
|
|
188
|
-
* the first occurrence, if any, of an hour, minute or second section.
|
|
189
|
-
* At least one of the four sections must be present, and if "T" is present
|
|
190
|
-
* there must be at least one section after the "T".
|
|
191
|
-
* The number part of each section must consist of one or more ASCII digits.
|
|
192
|
-
* The number may be prefixed by the ASCII negative or positive symbol.
|
|
193
|
-
* The number of days, hours and minutes must parse to an {@code long}.
|
|
194
|
-
* The number of seconds must parse to an {@code long} with optional fraction.
|
|
195
|
-
* The decimal point may be either a dot or a comma.
|
|
196
|
-
* The fractional part may have from zero to 9 digits.
|
|
197
|
-
* <p>
|
|
198
|
-
* The leading plus/minus sign, and negative values for other units are
|
|
199
|
-
* not part of the ISO-8601 standard.
|
|
200
|
-
* <p>
|
|
201
|
-
* Examples:
|
|
202
|
-
* <pre>
|
|
203
|
-
* "PT20.345S" -- parses as "20.345 seconds"
|
|
204
|
-
* "PT15M" -- parses as "15 minutes" (where a minute is 60 seconds)
|
|
205
|
-
* "PT10H" -- parses as "10 hours" (where an hour is 3600 seconds)
|
|
206
|
-
* "P2D" -- parses as "2 days" (where a day is 24 hours or 86400 seconds)
|
|
207
|
-
* "P2DT3H4M" -- parses as "2 days, 3 hours and 4 minutes"
|
|
208
|
-
* "P-6H3M" -- parses as "-6 hours and +3 minutes"
|
|
209
|
-
* "-P6H3M" -- parses as "-6 hours and -3 minutes"
|
|
210
|
-
* "-P-6H+3M" -- parses as "+6 hours and -3 minutes"
|
|
211
|
-
* </pre>
|
|
212
|
-
* @param text the text to parse, not null
|
|
213
|
-
* @return the parsed duration, not null
|
|
214
|
-
* @throws DateTimeParseException if the text cannot be parsed to a duration
|
|
215
|
-
*/
|
|
216
|
-
parse(text: CharSequence): Duration;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Obtains a {@code Duration} representing the duration between two temporal objects.
|
|
220
|
-
* <p>
|
|
221
|
-
* This calculates the duration between two temporal objects. If the objects
|
|
222
|
-
* are of different types, then the duration is calculated based on the type
|
|
223
|
-
* of the first object. For example, if the first argument is a {@code LocalTime}
|
|
224
|
-
* then the second argument is converted to a {@code LocalTime}.
|
|
225
|
-
* <p>
|
|
226
|
-
* The specified temporal objects must support the {@link ChronoUnit#SECONDS SECONDS} unit.
|
|
227
|
-
* For full accuracy, either the {@link ChronoUnit#NANOS NANOS} unit or the
|
|
228
|
-
* {@link ChronoField#NANO_OF_SECOND NANO_OF_SECOND} field should be supported.
|
|
229
|
-
* <p>
|
|
230
|
-
* The result of this method can be a negative period if the end is before the start.
|
|
231
|
-
* To guarantee to obtain a positive duration call {@link #abs()} on the result.
|
|
232
|
-
* @param startInclusive the start instant, inclusive, not null
|
|
233
|
-
* @param endExclusive the end instant, exclusive, not null
|
|
234
|
-
* @return a {@code Duration}, not null
|
|
235
|
-
* @throws DateTimeException if the seconds between the temporals cannot be obtained
|
|
236
|
-
* @throws ArithmeticException if the calculation exceeds the capacity of {@code Duration}
|
|
237
|
-
*/
|
|
238
|
-
between(startInclusive: Temporal, endExclusive: Temporal): Duration;
|
|
239
|
-
|
|
240
50
|
/**
|
|
241
51
|
* Gets the value of the requested unit.
|
|
242
52
|
* <p>
|
|
@@ -5,16 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _default = {
|
|
8
|
-
ofDays: function ofDays() {},
|
|
9
|
-
ofHours: function ofHours() {},
|
|
10
|
-
ofMinutes: function ofMinutes() {},
|
|
11
|
-
ofSeconds: function ofSeconds() {},
|
|
12
|
-
ofMillis: function ofMillis() {},
|
|
13
|
-
ofNanos: function ofNanos() {},
|
|
14
|
-
of: function of() {},
|
|
15
|
-
from: function from() {},
|
|
16
|
-
parse: function parse() {},
|
|
17
|
-
between: function between() {},
|
|
18
8
|
get: function get() {},
|
|
19
9
|
getUnits: function getUnits() {},
|
|
20
10
|
isZero: function isZero() {},
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import type { Clock } from "../Clock";
|
|
2
|
-
|
|
3
|
-
import type { TemporalAccessor } from "../temporal/TemporalAccessor";
|
|
4
|
-
import type { CharSequence } from "../../lang/CharSequence";
|
|
5
1
|
import type { TemporalField } from "../temporal/TemporalField";
|
|
6
2
|
|
|
7
3
|
import type { TemporalUnit } from "../temporal/TemporalUnit";
|
|
@@ -133,103 +129,6 @@ export type Instant = Object &
|
|
|
133
129
|
TemporalAdjuster &
|
|
134
130
|
Comparable &
|
|
135
131
|
Serializable & {
|
|
136
|
-
/**
|
|
137
|
-
* Obtains the current instant from the system clock.
|
|
138
|
-
* <p>
|
|
139
|
-
* This will query the {@link Clock#systemUTC() system UTC clock} to
|
|
140
|
-
* obtain the current instant.
|
|
141
|
-
* <p>
|
|
142
|
-
* Using this method will prevent the ability to use an alternate time-source for
|
|
143
|
-
* testing because the clock is effectively hard-coded.
|
|
144
|
-
* @return the current instant using the system clock, not null
|
|
145
|
-
*/
|
|
146
|
-
now(): Instant;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Obtains the current instant from the specified clock.
|
|
150
|
-
* <p>
|
|
151
|
-
* This will query the specified clock to obtain the current time.
|
|
152
|
-
* <p>
|
|
153
|
-
* Using this method allows the use of an alternate clock for testing.
|
|
154
|
-
* The alternate clock may be introduced using {@link Clock dependency injection}.
|
|
155
|
-
* @param clock the clock to use, not null
|
|
156
|
-
* @return the current instant, not null
|
|
157
|
-
*/
|
|
158
|
-
now(clock: Clock): Instant;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Obtains an instance of {@code Instant} using seconds from the
|
|
162
|
-
* epoch of 1970-01-01T00:00:00Z.
|
|
163
|
-
* <p>
|
|
164
|
-
* The nanosecond field is set to zero.
|
|
165
|
-
* @param epochSecond the number of seconds from 1970-01-01T00:00:00Z
|
|
166
|
-
* @return an instant, not null
|
|
167
|
-
* @throws DateTimeException if the instant exceeds the maximum or minimum instant
|
|
168
|
-
*/
|
|
169
|
-
ofEpochSecond(epochSecond: number): Instant;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Obtains an instance of {@code Instant} using seconds from the
|
|
173
|
-
* epoch of 1970-01-01T00:00:00Z and nanosecond fraction of second.
|
|
174
|
-
* <p>
|
|
175
|
-
* This method allows an arbitrary number of nanoseconds to be passed in.
|
|
176
|
-
* The factory will alter the values of the second and nanosecond in order
|
|
177
|
-
* to ensure that the stored nanosecond is in the range 0 to 999,999,999.
|
|
178
|
-
* For example, the following will result in the exactly the same instant:
|
|
179
|
-
* <pre>
|
|
180
|
-
* Instant.ofEpochSecond(3, 1);
|
|
181
|
-
* Instant.ofEpochSecond(4, -999_999_999);
|
|
182
|
-
* Instant.ofEpochSecond(2, 1000_000_001);
|
|
183
|
-
* </pre>
|
|
184
|
-
* @param epochSecond the number of seconds from 1970-01-01T00:00:00Z
|
|
185
|
-
* @param nanoAdjustment the nanosecond adjustment to the number of seconds, positive or negative
|
|
186
|
-
* @return an instant, not null
|
|
187
|
-
* @throws DateTimeException if the instant exceeds the maximum or minimum instant
|
|
188
|
-
* @throws ArithmeticException if numeric overflow occurs
|
|
189
|
-
*/
|
|
190
|
-
ofEpochSecond(epochSecond: number, nanoAdjustment: number): Instant;
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Obtains an instance of {@code Instant} using milliseconds from the
|
|
194
|
-
* epoch of 1970-01-01T00:00:00Z.
|
|
195
|
-
* <p>
|
|
196
|
-
* The seconds and nanoseconds are extracted from the specified milliseconds.
|
|
197
|
-
* @param epochMilli the number of milliseconds from 1970-01-01T00:00:00Z
|
|
198
|
-
* @return an instant, not null
|
|
199
|
-
* @throws DateTimeException if the instant exceeds the maximum or minimum instant
|
|
200
|
-
*/
|
|
201
|
-
ofEpochMilli(epochMilli: number): Instant;
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Obtains an instance of {@code Instant} from a temporal object.
|
|
205
|
-
* <p>
|
|
206
|
-
* This obtains an instant based on the specified temporal.
|
|
207
|
-
* A {@code TemporalAccessor} represents an arbitrary set of date and time information,
|
|
208
|
-
* which this factory converts to an instance of {@code Instant}.
|
|
209
|
-
* <p>
|
|
210
|
-
* The conversion extracts the {@link ChronoField#INSTANT_SECONDS INSTANT_SECONDS}
|
|
211
|
-
* and {@link ChronoField#NANO_OF_SECOND NANO_OF_SECOND} fields.
|
|
212
|
-
* <p>
|
|
213
|
-
* This method matches the signature of the functional interface {@link TemporalQuery}
|
|
214
|
-
* allowing it to be used as a query via method reference, {@code Instant::from}.
|
|
215
|
-
* @param temporal the temporal object to convert, not null
|
|
216
|
-
* @return the instant, not null
|
|
217
|
-
* @throws DateTimeException if unable to convert to an {@code Instant}
|
|
218
|
-
*/
|
|
219
|
-
from(temporal: TemporalAccessor): Instant;
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Obtains an instance of {@code Instant} from a text string such as
|
|
223
|
-
* {@code 2007-12-03T10:15:30.00Z}.
|
|
224
|
-
* <p>
|
|
225
|
-
* The string must represent a valid instant in UTC and is parsed using
|
|
226
|
-
* {@link DateTimeFormatter#ISO_INSTANT}.
|
|
227
|
-
* @param text the text to parse, not null
|
|
228
|
-
* @return the parsed instant, not null
|
|
229
|
-
* @throws DateTimeParseException if the text cannot be parsed
|
|
230
|
-
*/
|
|
231
|
-
parse(text: CharSequence): Instant;
|
|
232
|
-
|
|
233
132
|
/**
|
|
234
133
|
* Checks if the specified field is supported.
|
|
235
134
|
* <p>
|