@sitevision/api 2023.2.2-beta.1 → 2023.2.2-beta.2
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/types/java/io/File/index.d.ts +0 -120
- package/types/java/io/File/index.js +0 -2
- 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 +2 -93
- 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/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/spi/FileSystemProvider/index.d.ts +0 -12
- 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 +0 -45
- 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 +2 -215
- 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/javax/jcr/PropertyType/index.d.ts +2 -18
- package/types/javax/jcr/PropertyType/index.js +1 -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
|
@@ -1,30 +1,25 @@
|
|
|
1
|
-
import type { Comparator } from "../../util/Comparator";
|
|
2
|
-
import type { ZoneId } from "../ZoneId";
|
|
3
|
-
import type { Clock } from "../Clock";
|
|
4
|
-
import type { LocalDate } from "../LocalDate";
|
|
5
|
-
import type { LocalTime } from "../LocalTime";
|
|
6
|
-
import type { ZoneOffset } from "../ZoneOffset";
|
|
7
|
-
import type { LocalDateTime } from "../LocalDateTime";
|
|
8
|
-
|
|
9
|
-
import type { Instant } from "../Instant";
|
|
10
|
-
import type { TemporalAccessor } from "../temporal/TemporalAccessor";
|
|
11
|
-
import type { CharSequence } from "../../lang/CharSequence";
|
|
12
|
-
import type { DateTimeFormatter } from "../format/DateTimeFormatter";
|
|
13
1
|
import type { TemporalField } from "../temporal/TemporalField";
|
|
14
2
|
|
|
15
3
|
import type { TemporalUnit } from "../temporal/TemporalUnit";
|
|
16
4
|
import type { ValueRange } from "../temporal/ValueRange";
|
|
17
5
|
|
|
6
|
+
import type { ZoneOffset } from "../ZoneOffset";
|
|
7
|
+
import type { LocalDateTime } from "../LocalDateTime";
|
|
8
|
+
import type { LocalDate } from "../LocalDate";
|
|
18
9
|
import type { Month } from "../Month";
|
|
19
10
|
import type { DayOfWeek } from "../DayOfWeek";
|
|
11
|
+
import type { LocalTime } from "../LocalTime";
|
|
20
12
|
import type { TemporalAdjuster } from "../temporal/TemporalAdjuster";
|
|
21
13
|
import type { TemporalAmount } from "../temporal/TemporalAmount";
|
|
22
14
|
import type { TemporalQuery } from "../temporal/TemporalQuery";
|
|
23
15
|
|
|
24
16
|
import type { Temporal } from "../temporal/Temporal";
|
|
17
|
+
import type { DateTimeFormatter } from "../format/DateTimeFormatter";
|
|
25
18
|
import type { String } from "../../lang/String";
|
|
19
|
+
import type { ZoneId } from "../ZoneId";
|
|
26
20
|
import type { ZonedDateTime } from "../ZonedDateTime";
|
|
27
21
|
import type { OffsetTime } from "../OffsetTime";
|
|
22
|
+
import type { Instant } from "../Instant";
|
|
28
23
|
import type { Object } from "../../lang/Object";
|
|
29
24
|
import type { Comparable } from "../../lang/Comparable";
|
|
30
25
|
import type { Serializable } from "../../io/Serializable";
|
|
@@ -63,171 +58,6 @@ export type OffsetDateTime = Object &
|
|
|
63
58
|
TemporalAdjuster &
|
|
64
59
|
Comparable &
|
|
65
60
|
Serializable & {
|
|
66
|
-
/**
|
|
67
|
-
* Gets a comparator that compares two {@code OffsetDateTime} instances
|
|
68
|
-
* based solely on the instant.
|
|
69
|
-
* <p>
|
|
70
|
-
* This method differs from the comparison in {@link #compareTo} in that it
|
|
71
|
-
* only compares the underlying instant.
|
|
72
|
-
* @return a comparator that compares in time-line order
|
|
73
|
-
* @see #isAfter
|
|
74
|
-
* @see #isBefore
|
|
75
|
-
* @see #isEqual
|
|
76
|
-
*/
|
|
77
|
-
timeLineOrder(): Comparator;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Obtains the current date-time from the system clock in the default time-zone.
|
|
81
|
-
* <p>
|
|
82
|
-
* This will query the {@link Clock#systemDefaultZone() system clock} in the default
|
|
83
|
-
* time-zone to obtain the current date-time.
|
|
84
|
-
* The offset will be calculated from the time-zone in the clock.
|
|
85
|
-
* <p>
|
|
86
|
-
* Using this method will prevent the ability to use an alternate clock for testing
|
|
87
|
-
* because the clock is hard-coded.
|
|
88
|
-
* @return the current date-time using the system clock, not null
|
|
89
|
-
*/
|
|
90
|
-
now(): OffsetDateTime;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Obtains the current date-time from the system clock in the specified time-zone.
|
|
94
|
-
* <p>
|
|
95
|
-
* This will query the {@link Clock#system(ZoneId) system clock} to obtain the current date-time.
|
|
96
|
-
* Specifying the time-zone avoids dependence on the default time-zone.
|
|
97
|
-
* The offset will be calculated from the specified time-zone.
|
|
98
|
-
* <p>
|
|
99
|
-
* Using this method will prevent the ability to use an alternate clock for testing
|
|
100
|
-
* because the clock is hard-coded.
|
|
101
|
-
* @param zone the zone ID to use, not null
|
|
102
|
-
* @return the current date-time using the system clock, not null
|
|
103
|
-
*/
|
|
104
|
-
now(zone: ZoneId): OffsetDateTime;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Obtains the current date-time from the specified clock.
|
|
108
|
-
* <p>
|
|
109
|
-
* This will query the specified clock to obtain the current date-time.
|
|
110
|
-
* The offset will be calculated from the time-zone in the clock.
|
|
111
|
-
* <p>
|
|
112
|
-
* Using this method allows the use of an alternate clock for testing.
|
|
113
|
-
* The alternate clock may be introduced using {@link Clock dependency injection}.
|
|
114
|
-
* @param clock the clock to use, not null
|
|
115
|
-
* @return the current date-time, not null
|
|
116
|
-
*/
|
|
117
|
-
now(clock: Clock): OffsetDateTime;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Obtains an instance of {@code OffsetDateTime} from a date, time and offset.
|
|
121
|
-
* <p>
|
|
122
|
-
* This creates an offset date-time with the specified local date, time and offset.
|
|
123
|
-
* @param date the local date, not null
|
|
124
|
-
* @param time the local time, not null
|
|
125
|
-
* @param offset the zone offset, not null
|
|
126
|
-
* @return the offset date-time, not null
|
|
127
|
-
*/
|
|
128
|
-
of(date: LocalDate, time: LocalTime, offset: ZoneOffset): OffsetDateTime;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Obtains an instance of {@code OffsetDateTime} from a date-time and offset.
|
|
132
|
-
* <p>
|
|
133
|
-
* This creates an offset date-time with the specified local date-time and offset.
|
|
134
|
-
* @param dateTime the local date-time, not null
|
|
135
|
-
* @param offset the zone offset, not null
|
|
136
|
-
* @return the offset date-time, not null
|
|
137
|
-
*/
|
|
138
|
-
of(dateTime: LocalDateTime, offset: ZoneOffset): OffsetDateTime;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Obtains an instance of {@code OffsetDateTime} from a year, month, day,
|
|
142
|
-
* hour, minute, second, nanosecond and offset.
|
|
143
|
-
* <p>
|
|
144
|
-
* This creates an offset date-time with the seven specified fields.
|
|
145
|
-
* <p>
|
|
146
|
-
* This method exists primarily for writing test cases.
|
|
147
|
-
* Non test-code will typically use other methods to create an offset time.
|
|
148
|
-
* {@code LocalDateTime} has five additional convenience variants of the
|
|
149
|
-
* equivalent factory method taking fewer arguments.
|
|
150
|
-
* They are not provided here to reduce the footprint of the API.
|
|
151
|
-
* @param year the year to represent, from MIN_YEAR to MAX_YEAR
|
|
152
|
-
* @param month the month-of-year to represent, from 1 (January) to 12 (December)
|
|
153
|
-
* @param dayOfMonth the day-of-month to represent, from 1 to 31
|
|
154
|
-
* @param hour the hour-of-day to represent, from 0 to 23
|
|
155
|
-
* @param minute the minute-of-hour to represent, from 0 to 59
|
|
156
|
-
* @param second the second-of-minute to represent, from 0 to 59
|
|
157
|
-
* @param nanoOfSecond the nano-of-second to represent, from 0 to 999,999,999
|
|
158
|
-
* @param offset the zone offset, not null
|
|
159
|
-
* @return the offset date-time, not null
|
|
160
|
-
* @throws DateTimeException if the value of any field is out of range, or
 if the day-of-month is invalid for the month-year
|
|
161
|
-
*/
|
|
162
|
-
of(
|
|
163
|
-
year: number,
|
|
164
|
-
month: number,
|
|
165
|
-
dayOfMonth: number,
|
|
166
|
-
hour: number,
|
|
167
|
-
minute: number,
|
|
168
|
-
second: number,
|
|
169
|
-
nanoOfSecond: number,
|
|
170
|
-
offset: ZoneOffset
|
|
171
|
-
): OffsetDateTime;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Obtains an instance of {@code OffsetDateTime} from an {@code Instant} and zone ID.
|
|
175
|
-
* <p>
|
|
176
|
-
* This creates an offset date-time with the same instant as that specified.
|
|
177
|
-
* Finding the offset from UTC/Greenwich is simple as there is only one valid
|
|
178
|
-
* offset for each instant.
|
|
179
|
-
* @param instant the instant to create the date-time from, not null
|
|
180
|
-
* @param zone the time-zone, which may be an offset, not null
|
|
181
|
-
* @return the offset date-time, not null
|
|
182
|
-
* @throws DateTimeException if the result exceeds the supported range
|
|
183
|
-
*/
|
|
184
|
-
ofInstant(instant: Instant, zone: ZoneId): OffsetDateTime;
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Obtains an instance of {@code OffsetDateTime} from a temporal object.
|
|
188
|
-
* <p>
|
|
189
|
-
* This obtains an offset date-time based on the specified temporal.
|
|
190
|
-
* A {@code TemporalAccessor} represents an arbitrary set of date and time information,
|
|
191
|
-
* which this factory converts to an instance of {@code OffsetDateTime}.
|
|
192
|
-
* <p>
|
|
193
|
-
* The conversion will first obtain a {@code ZoneOffset} from the temporal object.
|
|
194
|
-
* It will then try to obtain a {@code LocalDateTime}, falling back to an {@code Instant} if necessary.
|
|
195
|
-
* The result will be the combination of {@code ZoneOffset} with either
|
|
196
|
-
* with {@code LocalDateTime} or {@code Instant}.
|
|
197
|
-
* Implementations are permitted to perform optimizations such as accessing
|
|
198
|
-
* those fields that are equivalent to the relevant objects.
|
|
199
|
-
* <p>
|
|
200
|
-
* This method matches the signature of the functional interface {@link TemporalQuery}
|
|
201
|
-
* allowing it to be used as a query via method reference, {@code OffsetDateTime::from}.
|
|
202
|
-
* @param temporal the temporal object to convert, not null
|
|
203
|
-
* @return the offset date-time, not null
|
|
204
|
-
* @throws DateTimeException if unable to convert to an {@code OffsetDateTime}
|
|
205
|
-
*/
|
|
206
|
-
from(temporal: TemporalAccessor): OffsetDateTime;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Obtains an instance of {@code OffsetDateTime} from a text string
|
|
210
|
-
* such as {@code 2007-12-03T10:15:30+01:00}.
|
|
211
|
-
* <p>
|
|
212
|
-
* The string must represent a valid date-time and is parsed using
|
|
213
|
-
* {@link java.time.format.DateTimeFormatter#ISO_OFFSET_DATE_TIME}.
|
|
214
|
-
* @param text the text to parse such as "2007-12-03T10:15:30+01:00", not null
|
|
215
|
-
* @return the parsed offset date-time, not null
|
|
216
|
-
* @throws DateTimeParseException if the text cannot be parsed
|
|
217
|
-
*/
|
|
218
|
-
parse(text: CharSequence): OffsetDateTime;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Obtains an instance of {@code OffsetDateTime} from a text string using a specific formatter.
|
|
222
|
-
* <p>
|
|
223
|
-
* The text is parsed using the formatter, returning a date-time.
|
|
224
|
-
* @param text the text to parse, not null
|
|
225
|
-
* @param formatter the formatter to use, not null
|
|
226
|
-
* @return the parsed offset date-time, not null
|
|
227
|
-
* @throws DateTimeParseException if the text cannot be parsed
|
|
228
|
-
*/
|
|
229
|
-
parse(text: CharSequence, formatter: DateTimeFormatter): OffsetDateTime;
|
|
230
|
-
|
|
231
61
|
/**
|
|
232
62
|
* Checks if the specified field is supported.
|
|
233
63
|
* <p>
|
|
@@ -5,12 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _default = {
|
|
8
|
-
timeLineOrder: function timeLineOrder() {},
|
|
9
|
-
now: function now() {},
|
|
10
|
-
of: function of() {},
|
|
11
|
-
ofInstant: function ofInstant() {},
|
|
12
|
-
from: function from() {},
|
|
13
|
-
parse: function parse() {},
|
|
14
8
|
isSupported: function isSupported() {},
|
|
15
9
|
range: function range() {},
|
|
16
10
|
get: function get() {},
|
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
import type { ZoneId } from "../ZoneId";
|
|
2
|
-
import type { Clock } from "../Clock";
|
|
3
|
-
import type { LocalTime } from "../LocalTime";
|
|
4
|
-
import type { ZoneOffset } from "../ZoneOffset";
|
|
5
|
-
|
|
6
|
-
import type { Instant } from "../Instant";
|
|
7
|
-
import type { TemporalAccessor } from "../temporal/TemporalAccessor";
|
|
8
|
-
import type { CharSequence } from "../../lang/CharSequence";
|
|
9
|
-
import type { DateTimeFormatter } from "../format/DateTimeFormatter";
|
|
10
1
|
import type { TemporalField } from "../temporal/TemporalField";
|
|
11
2
|
|
|
12
3
|
import type { TemporalUnit } from "../temporal/TemporalUnit";
|
|
13
4
|
import type { ValueRange } from "../temporal/ValueRange";
|
|
14
5
|
|
|
6
|
+
import type { ZoneOffset } from "../ZoneOffset";
|
|
7
|
+
import type { LocalTime } from "../LocalTime";
|
|
15
8
|
import type { TemporalAdjuster } from "../temporal/TemporalAdjuster";
|
|
16
9
|
import type { TemporalAmount } from "../temporal/TemporalAmount";
|
|
17
10
|
import type { TemporalQuery } from "../temporal/TemporalQuery";
|
|
18
11
|
|
|
19
12
|
import type { Temporal } from "../temporal/Temporal";
|
|
13
|
+
import type { DateTimeFormatter } from "../format/DateTimeFormatter";
|
|
20
14
|
import type { String } from "../../lang/String";
|
|
21
15
|
import type { LocalDate } from "../LocalDate";
|
|
22
16
|
import type { OffsetDateTime } from "../OffsetDateTime";
|
|
@@ -49,138 +43,6 @@ export type OffsetTime = Object &
|
|
|
49
43
|
TemporalAdjuster &
|
|
50
44
|
Comparable &
|
|
51
45
|
Serializable & {
|
|
52
|
-
/**
|
|
53
|
-
* Obtains the current time from the system clock in the default time-zone.
|
|
54
|
-
* <p>
|
|
55
|
-
* This will query the {@link Clock#systemDefaultZone() system clock} in the default
|
|
56
|
-
* time-zone to obtain the current time.
|
|
57
|
-
* The offset will be calculated from the time-zone in the clock.
|
|
58
|
-
* <p>
|
|
59
|
-
* Using this method will prevent the ability to use an alternate clock for testing
|
|
60
|
-
* because the clock is hard-coded.
|
|
61
|
-
* @return the current time using the system clock and default time-zone, not null
|
|
62
|
-
*/
|
|
63
|
-
now(): OffsetTime;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Obtains the current time from the system clock in the specified time-zone.
|
|
67
|
-
* <p>
|
|
68
|
-
* This will query the {@link Clock#system(ZoneId) system clock} to obtain the current time.
|
|
69
|
-
* Specifying the time-zone avoids dependence on the default time-zone.
|
|
70
|
-
* The offset will be calculated from the specified time-zone.
|
|
71
|
-
* <p>
|
|
72
|
-
* Using this method will prevent the ability to use an alternate clock for testing
|
|
73
|
-
* because the clock is hard-coded.
|
|
74
|
-
* @param zone the zone ID to use, not null
|
|
75
|
-
* @return the current time using the system clock, not null
|
|
76
|
-
*/
|
|
77
|
-
now(zone: ZoneId): OffsetTime;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Obtains the current time from the specified clock.
|
|
81
|
-
* <p>
|
|
82
|
-
* This will query the specified clock to obtain the current time.
|
|
83
|
-
* The offset will be calculated from the time-zone in the clock.
|
|
84
|
-
* <p>
|
|
85
|
-
* Using this method allows the use of an alternate clock for testing.
|
|
86
|
-
* The alternate clock may be introduced using {@link Clock dependency injection}.
|
|
87
|
-
* @param clock the clock to use, not null
|
|
88
|
-
* @return the current time, not null
|
|
89
|
-
*/
|
|
90
|
-
now(clock: Clock): OffsetTime;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Obtains an instance of {@code OffsetTime} from a local time and an offset.
|
|
94
|
-
* @param time the local time, not null
|
|
95
|
-
* @param offset the zone offset, not null
|
|
96
|
-
* @return the offset time, not null
|
|
97
|
-
*/
|
|
98
|
-
of(time: LocalTime, offset: ZoneOffset): OffsetTime;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Obtains an instance of {@code OffsetTime} from an hour, minute, second and nanosecond.
|
|
102
|
-
* <p>
|
|
103
|
-
* This creates an offset time with the four specified fields.
|
|
104
|
-
* <p>
|
|
105
|
-
* This method exists primarily for writing test cases.
|
|
106
|
-
* Non test-code will typically use other methods to create an offset time.
|
|
107
|
-
* {@code LocalTime} has two additional convenience variants of the
|
|
108
|
-
* equivalent factory method taking fewer arguments.
|
|
109
|
-
* They are not provided here to reduce the footprint of the API.
|
|
110
|
-
* @param hour the hour-of-day to represent, from 0 to 23
|
|
111
|
-
* @param minute the minute-of-hour to represent, from 0 to 59
|
|
112
|
-
* @param second the second-of-minute to represent, from 0 to 59
|
|
113
|
-
* @param nanoOfSecond the nano-of-second to represent, from 0 to 999,999,999
|
|
114
|
-
* @param offset the zone offset, not null
|
|
115
|
-
* @return the offset time, not null
|
|
116
|
-
* @throws DateTimeException if the value of any field is out of range
|
|
117
|
-
*/
|
|
118
|
-
of(
|
|
119
|
-
hour: number,
|
|
120
|
-
minute: number,
|
|
121
|
-
second: number,
|
|
122
|
-
nanoOfSecond: number,
|
|
123
|
-
offset: ZoneOffset
|
|
124
|
-
): OffsetTime;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Obtains an instance of {@code OffsetTime} from an {@code Instant} and zone ID.
|
|
128
|
-
* <p>
|
|
129
|
-
* This creates an offset time with the same instant as that specified.
|
|
130
|
-
* Finding the offset from UTC/Greenwich is simple as there is only one valid
|
|
131
|
-
* offset for each instant.
|
|
132
|
-
* <p>
|
|
133
|
-
* The date component of the instant is dropped during the conversion.
|
|
134
|
-
* This means that the conversion can never fail due to the instant being
|
|
135
|
-
* out of the valid range of dates.
|
|
136
|
-
* @param instant the instant to create the time from, not null
|
|
137
|
-
* @param zone the time-zone, which may be an offset, not null
|
|
138
|
-
* @return the offset time, not null
|
|
139
|
-
*/
|
|
140
|
-
ofInstant(instant: Instant, zone: ZoneId): OffsetTime;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Obtains an instance of {@code OffsetTime} from a temporal object.
|
|
144
|
-
* <p>
|
|
145
|
-
* This obtains an offset time based on the specified temporal.
|
|
146
|
-
* A {@code TemporalAccessor} represents an arbitrary set of date and time information,
|
|
147
|
-
* which this factory converts to an instance of {@code OffsetTime}.
|
|
148
|
-
* <p>
|
|
149
|
-
* The conversion extracts and combines the {@code ZoneOffset} and the
|
|
150
|
-
* {@code LocalTime} from the temporal object.
|
|
151
|
-
* Implementations are permitted to perform optimizations such as accessing
|
|
152
|
-
* those fields that are equivalent to the relevant objects.
|
|
153
|
-
* <p>
|
|
154
|
-
* This method matches the signature of the functional interface {@link TemporalQuery}
|
|
155
|
-
* allowing it to be used as a query via method reference, {@code OffsetTime::from}.
|
|
156
|
-
* @param temporal the temporal object to convert, not null
|
|
157
|
-
* @return the offset time, not null
|
|
158
|
-
* @throws DateTimeException if unable to convert to an {@code OffsetTime}
|
|
159
|
-
*/
|
|
160
|
-
from(temporal: TemporalAccessor): OffsetTime;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Obtains an instance of {@code OffsetTime} from a text string such as {@code 10:15:30+01:00}.
|
|
164
|
-
* <p>
|
|
165
|
-
* The string must represent a valid time and is parsed using
|
|
166
|
-
* {@link java.time.format.DateTimeFormatter#ISO_OFFSET_TIME}.
|
|
167
|
-
* @param text the text to parse such as "10:15:30+01:00", not null
|
|
168
|
-
* @return the parsed local time, not null
|
|
169
|
-
* @throws DateTimeParseException if the text cannot be parsed
|
|
170
|
-
*/
|
|
171
|
-
parse(text: CharSequence): OffsetTime;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Obtains an instance of {@code OffsetTime} from a text string using a specific formatter.
|
|
175
|
-
* <p>
|
|
176
|
-
* The text is parsed using the formatter, returning a time.
|
|
177
|
-
* @param text the text to parse, not null
|
|
178
|
-
* @param formatter the formatter to use, not null
|
|
179
|
-
* @return the parsed offset time, not null
|
|
180
|
-
* @throws DateTimeParseException if the text cannot be parsed
|
|
181
|
-
*/
|
|
182
|
-
parse(text: CharSequence, formatter: DateTimeFormatter): OffsetTime;
|
|
183
|
-
|
|
184
46
|
/**
|
|
185
47
|
* Checks if the specified field is supported.
|
|
186
48
|
* <p>
|
|
@@ -5,11 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _default = {
|
|
8
|
-
now: function now() {},
|
|
9
|
-
of: function of() {},
|
|
10
|
-
ofInstant: function ofInstant() {},
|
|
11
|
-
from: function from() {},
|
|
12
|
-
parse: function parse() {},
|
|
13
8
|
isSupported: function isSupported() {},
|
|
14
9
|
range: function range() {},
|
|
15
10
|
get: function get() {},
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type { TemporalAmount } from "../temporal/TemporalAmount";
|
|
2
|
-
import type { CharSequence } from "../../lang/CharSequence";
|
|
3
|
-
import type { LocalDate } from "../LocalDate";
|
|
4
1
|
import type { TemporalUnit } from "../temporal/TemporalUnit";
|
|
5
2
|
|
|
6
3
|
import type { List } from "../../util/List";
|
|
7
4
|
import type { IsoChronology } from "../chrono/IsoChronology";
|
|
8
5
|
|
|
6
|
+
import type { TemporalAmount } from "../temporal/TemporalAmount";
|
|
9
7
|
import type { Temporal } from "../temporal/Temporal";
|
|
10
8
|
import type { Object } from "../../lang/Object";
|
|
11
9
|
import type { String } from "../../lang/String";
|
|
@@ -54,138 +52,6 @@ import type { Serializable } from "../../io/Serializable";
|
|
|
54
52
|
export type Period = Object &
|
|
55
53
|
ChronoPeriod &
|
|
56
54
|
Serializable & {
|
|
57
|
-
/**
|
|
58
|
-
* Obtains a {@code Period} representing a number of years.
|
|
59
|
-
* <p>
|
|
60
|
-
* The resulting period will have the specified years.
|
|
61
|
-
* The months and days units will be zero.
|
|
62
|
-
* @param years the number of years, positive or negative
|
|
63
|
-
* @return the period of years, not null
|
|
64
|
-
*/
|
|
65
|
-
ofYears(years: number): Period;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Obtains a {@code Period} representing a number of months.
|
|
69
|
-
* <p>
|
|
70
|
-
* The resulting period will have the specified months.
|
|
71
|
-
* The years and days units will be zero.
|
|
72
|
-
* @param months the number of months, positive or negative
|
|
73
|
-
* @return the period of months, not null
|
|
74
|
-
*/
|
|
75
|
-
ofMonths(months: number): Period;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Obtains a {@code Period} representing a number of weeks.
|
|
79
|
-
* <p>
|
|
80
|
-
* The resulting period will be day-based, with the amount of days
|
|
81
|
-
* equal to the number of weeks multiplied by 7.
|
|
82
|
-
* The years and months units will be zero.
|
|
83
|
-
* @param weeks the number of weeks, positive or negative
|
|
84
|
-
* @return the period, with the input weeks converted to days, not null
|
|
85
|
-
*/
|
|
86
|
-
ofWeeks(weeks: number): Period;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Obtains a {@code Period} representing a number of days.
|
|
90
|
-
* <p>
|
|
91
|
-
* The resulting period will have the specified days.
|
|
92
|
-
* The years and months units will be zero.
|
|
93
|
-
* @param days the number of days, positive or negative
|
|
94
|
-
* @return the period of days, not null
|
|
95
|
-
*/
|
|
96
|
-
ofDays(days: number): Period;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Obtains a {@code Period} representing a number of years, months and days.
|
|
100
|
-
* <p>
|
|
101
|
-
* This creates an instance based on years, months and days.
|
|
102
|
-
* @param years the amount of years, may be negative
|
|
103
|
-
* @param months the amount of months, may be negative
|
|
104
|
-
* @param days the amount of days, may be negative
|
|
105
|
-
* @return the period of years, months and days, not null
|
|
106
|
-
*/
|
|
107
|
-
of(years: number, months: number, days: number): Period;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Obtains an instance of {@code Period} from a temporal amount.
|
|
111
|
-
* <p>
|
|
112
|
-
* This obtains a period based on the specified amount.
|
|
113
|
-
* A {@code TemporalAmount} represents an amount of time, which may be
|
|
114
|
-
* date-based or time-based, which this factory extracts to a {@code Period}.
|
|
115
|
-
* <p>
|
|
116
|
-
* The conversion loops around the set of units from the amount and uses
|
|
117
|
-
* the {@link ChronoUnit#YEARS YEARS}, {@link ChronoUnit#MONTHS MONTHS}
|
|
118
|
-
* and {@link ChronoUnit#DAYS DAYS} units to create a period.
|
|
119
|
-
* If any other units are found then an exception is thrown.
|
|
120
|
-
* <p>
|
|
121
|
-
* If the amount is a {@code ChronoPeriod} then it must use the ISO chronology.
|
|
122
|
-
* @param amount the temporal amount to convert, not null
|
|
123
|
-
* @return the equivalent period, not null
|
|
124
|
-
* @throws DateTimeException if unable to convert to a {@code Period}
|
|
125
|
-
* @throws ArithmeticException if the amount of years, months or days exceeds an int
|
|
126
|
-
*/
|
|
127
|
-
from(amount: TemporalAmount): Period;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Obtains a {@code Period} from a text string such as {@code PnYnMnD}.
|
|
131
|
-
* <p>
|
|
132
|
-
* This will parse the string produced by {@code toString()} which is
|
|
133
|
-
* based on the ISO-8601 period formats {@code PnYnMnD} and {@code PnW}.
|
|
134
|
-
* <p>
|
|
135
|
-
* The string starts with an optional sign, denoted by the ASCII negative
|
|
136
|
-
* or positive symbol. If negative, the whole period is negated.
|
|
137
|
-
* The ASCII letter "P" is next in upper or lower case.
|
|
138
|
-
* There are then four sections, each consisting of a number and a suffix.
|
|
139
|
-
* At least one of the four sections must be present.
|
|
140
|
-
* The sections have suffixes in ASCII of "Y", "M", "W" and "D" for
|
|
141
|
-
* years, months, weeks and days, accepted in upper or lower case.
|
|
142
|
-
* The suffixes must occur in order.
|
|
143
|
-
* The number part of each section must consist of ASCII digits.
|
|
144
|
-
* The number may be prefixed by the ASCII negative or positive symbol.
|
|
145
|
-
* The number must parse to an {@code int}.
|
|
146
|
-
* <p>
|
|
147
|
-
* The leading plus/minus sign, and negative values for other units are
|
|
148
|
-
* not part of the ISO-8601 standard. In addition, ISO-8601 does not
|
|
149
|
-
* permit mixing between the {@code PnYnMnD} and {@code PnW} formats.
|
|
150
|
-
* Any week-based input is multiplied by 7 and treated as a number of days.
|
|
151
|
-
* <p>
|
|
152
|
-
* For example, the following are valid inputs:
|
|
153
|
-
* <pre>
|
|
154
|
-
* "P2Y" -- Period.ofYears(2)
|
|
155
|
-
* "P3M" -- Period.ofMonths(3)
|
|
156
|
-
* "P4W" -- Period.ofWeeks(4)
|
|
157
|
-
* "P5D" -- Period.ofDays(5)
|
|
158
|
-
* "P1Y2M3D" -- Period.of(1, 2, 3)
|
|
159
|
-
* "P1Y2M3W4D" -- Period.of(1, 2, 25)
|
|
160
|
-
* "P-1Y2M" -- Period.of(-1, 2, 0)
|
|
161
|
-
* "-P1Y2M" -- Period.of(-1, -2, 0)
|
|
162
|
-
* </pre>
|
|
163
|
-
* @param text the text to parse, not null
|
|
164
|
-
* @return the parsed period, not null
|
|
165
|
-
* @throws DateTimeParseException if the text cannot be parsed to a period
|
|
166
|
-
*/
|
|
167
|
-
parse(text: CharSequence): Period;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Obtains a {@code Period} consisting of the number of years, months,
|
|
171
|
-
* and days between two dates.
|
|
172
|
-
* <p>
|
|
173
|
-
* The start date is included, but the end date is not.
|
|
174
|
-
* The period is calculated by removing complete months, then calculating
|
|
175
|
-
* the remaining number of days, adjusting to ensure that both have the same sign.
|
|
176
|
-
* The number of months is then split into years and months based on a 12 month year.
|
|
177
|
-
* A month is considered if the end day-of-month is greater than or equal to the start day-of-month.
|
|
178
|
-
* For example, from {@code 2010-01-15} to {@code 2011-03-18} is one year, two months and three days.
|
|
179
|
-
* <p>
|
|
180
|
-
* The result of this method can be a negative period if the end is before the start.
|
|
181
|
-
* The negative sign will be the same in each of year, month and day.
|
|
182
|
-
* @param startDateInclusive the start date, inclusive, not null
|
|
183
|
-
* @param endDateExclusive the end date, exclusive, not null
|
|
184
|
-
* @return the period between this date and the end date, not null
|
|
185
|
-
* @see ChronoLocalDate#until(ChronoLocalDate)
|
|
186
|
-
*/
|
|
187
|
-
between(startDateInclusive: LocalDate, endDateExclusive: LocalDate): Period;
|
|
188
|
-
|
|
189
55
|
/**
|
|
190
56
|
* Gets the value of the requested unit.
|
|
191
57
|
* <p>
|
|
@@ -5,14 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _default = {
|
|
8
|
-
ofYears: function ofYears() {},
|
|
9
|
-
ofMonths: function ofMonths() {},
|
|
10
|
-
ofWeeks: function ofWeeks() {},
|
|
11
|
-
ofDays: function ofDays() {},
|
|
12
|
-
of: function of() {},
|
|
13
|
-
from: function from() {},
|
|
14
|
-
parse: function parse() {},
|
|
15
|
-
between: function between() {},
|
|
16
8
|
get: function get() {},
|
|
17
9
|
getUnits: function getUnits() {},
|
|
18
10
|
getChronology: function getChronology() {},
|