@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,14 +1,11 @@
|
|
|
1
|
-
import type { Set } from "../../util/Set";
|
|
2
1
|
import type { String } from "../../lang/String";
|
|
3
|
-
import type { Map } from "../../util/Map";
|
|
4
|
-
import type { ZoneOffset } from "../ZoneOffset";
|
|
5
|
-
import type { TemporalAccessor } from "../temporal/TemporalAccessor";
|
|
6
2
|
import type { TextStyle } from "../format/TextStyle";
|
|
7
3
|
import type { Locale } from "../../util/Locale";
|
|
8
4
|
import type { ZoneRules } from "../zone/ZoneRules";
|
|
9
5
|
import type { Object } from "../../lang/Object";
|
|
10
6
|
|
|
11
7
|
import type { Serializable } from "../../io/Serializable";
|
|
8
|
+
import type { Map } from "../../util/Map";
|
|
12
9
|
|
|
13
10
|
/**
|
|
14
11
|
* A time-zone ID, such as {@code Europe/Paris}.
|
|
@@ -97,123 +94,6 @@ import type { Serializable } from "../../io/Serializable";
|
|
|
97
94
|
*/
|
|
98
95
|
export type ZoneId = Object &
|
|
99
96
|
Serializable & {
|
|
100
|
-
/**
|
|
101
|
-
* Gets the system default time-zone.
|
|
102
|
-
* <p>
|
|
103
|
-
* This queries {@link TimeZone#getDefault()} to find the default time-zone
|
|
104
|
-
* and converts it to a {@code ZoneId}. If the system default time-zone is changed,
|
|
105
|
-
* then the result of this method will also change.
|
|
106
|
-
* @return the zone ID, not null
|
|
107
|
-
* @throws DateTimeException if the converted zone ID has an invalid format
|
|
108
|
-
* @throws ZoneRulesException if the converted zone region ID cannot be found
|
|
109
|
-
*/
|
|
110
|
-
systemDefault(): ZoneId;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Gets the set of available zone IDs.
|
|
114
|
-
* <p>
|
|
115
|
-
* This set includes the string form of all available region-based IDs.
|
|
116
|
-
* Offset-based zone IDs are not included in the returned set.
|
|
117
|
-
* The ID can be passed to {@link #of(String)} to create a {@code ZoneId}.
|
|
118
|
-
* <p>
|
|
119
|
-
* The set of zone IDs can increase over time, although in a typical application
|
|
120
|
-
* the set of IDs is fixed. Each call to this method is thread-safe.
|
|
121
|
-
* @return a modifiable copy of the set of zone IDs, not null
|
|
122
|
-
*/
|
|
123
|
-
getAvailableZoneIds(): Set;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Obtains an instance of {@code ZoneId} using its ID using a map
|
|
127
|
-
* of aliases to supplement the standard zone IDs.
|
|
128
|
-
* <p>
|
|
129
|
-
* Many users of time-zones use short abbreviations, such as PST for
|
|
130
|
-
* 'Pacific Standard Time' and PDT for 'Pacific Daylight Time'.
|
|
131
|
-
* These abbreviations are not unique, and so cannot be used as IDs.
|
|
132
|
-
* This method allows a map of string to time-zone to be setup and reused
|
|
133
|
-
* within an application.
|
|
134
|
-
* @param zoneId the time-zone ID, not null
|
|
135
|
-
* @param aliasMap a map of alias zone IDs (typically abbreviations) to real zone IDs, not null
|
|
136
|
-
* @return the zone ID, not null
|
|
137
|
-
* @throws DateTimeException if the zone ID has an invalid format
|
|
138
|
-
* @throws ZoneRulesException if the zone ID is a region ID that cannot be found
|
|
139
|
-
*/
|
|
140
|
-
of(zoneId: String | string, aliasMap: Map | {}): ZoneId;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Obtains an instance of {@code ZoneId} from an ID ensuring that the
|
|
144
|
-
* ID is valid and available for use.
|
|
145
|
-
* <p>
|
|
146
|
-
* This method parses the ID producing a {@code ZoneId} or {@code ZoneOffset}.
|
|
147
|
-
* A {@code ZoneOffset} is returned if the ID is 'Z', or starts with '+' or '-'.
|
|
148
|
-
* The result will always be a valid ID for which {@link ZoneRules} can be obtained.
|
|
149
|
-
* <p>
|
|
150
|
-
* Parsing matches the zone ID step by step as follows.
|
|
151
|
-
* <ul>
|
|
152
|
-
* <li>If the zone ID equals 'Z', the result is {@code ZoneOffset.UTC}.
|
|
153
|
-
* <li>If the zone ID consists of a single letter, the zone ID is invalid
|
|
154
|
-
* and {@code DateTimeException} is thrown.
|
|
155
|
-
* <li>If the zone ID starts with '+' or '-', the ID is parsed as a
|
|
156
|
-
* {@code ZoneOffset} using {@link ZoneOffset#of(String)}.
|
|
157
|
-
* <li>If the zone ID equals 'GMT', 'UTC' or 'UT' then the result is a {@code ZoneId}
|
|
158
|
-
* with the same ID and rules equivalent to {@code ZoneOffset.UTC}.
|
|
159
|
-
* <li>If the zone ID starts with 'UTC+', 'UTC-', 'GMT+', 'GMT-', 'UT+' or 'UT-'
|
|
160
|
-
* then the ID is a prefixed offset-based ID. The ID is split in two, with
|
|
161
|
-
* a two or three letter prefix and a suffix starting with the sign.
|
|
162
|
-
* The suffix is parsed as a {@link ZoneOffset#of(String) ZoneOffset}.
|
|
163
|
-
* The result will be a {@code ZoneId} with the specified UTC/GMT/UT prefix
|
|
164
|
-
* and the normalized offset ID as per {@link ZoneOffset#getId()}.
|
|
165
|
-
* The rules of the returned {@code ZoneId} will be equivalent to the
|
|
166
|
-
* parsed {@code ZoneOffset}.
|
|
167
|
-
* <li>All other IDs are parsed as region-based zone IDs. Region IDs must
|
|
168
|
-
* match the regular expression <code>[A-Za-z][A-Za-z0-9~/._+-]+</code>
|
|
169
|
-
* otherwise a {@code DateTimeException} is thrown. If the zone ID is not
|
|
170
|
-
* in the configured set of IDs, {@code ZoneRulesException} is thrown.
|
|
171
|
-
* The detailed format of the region ID depends on the group supplying the data.
|
|
172
|
-
* The default set of data is supplied by the IANA Time Zone Database (TZDB).
|
|
173
|
-
* This has region IDs of the form '{area}/{city}', such as 'Europe/Paris' or 'America/New_York'.
|
|
174
|
-
* This is compatible with most IDs from {@link java.util.TimeZone}.
|
|
175
|
-
* </ul>
|
|
176
|
-
* @param zoneId the time-zone ID, not null
|
|
177
|
-
* @return the zone ID, not null
|
|
178
|
-
* @throws DateTimeException if the zone ID has an invalid format
|
|
179
|
-
* @throws ZoneRulesException if the zone ID is a region ID that cannot be found
|
|
180
|
-
*/
|
|
181
|
-
of(zoneId: String | string): ZoneId;
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Obtains an instance of {@code ZoneId} wrapping an offset.
|
|
185
|
-
* <p>
|
|
186
|
-
* If the prefix is "GMT", "UTC", or "UT" a {@code ZoneId}
|
|
187
|
-
* with the prefix and the non-zero offset is returned.
|
|
188
|
-
* If the prefix is empty {@code ""} the {@code ZoneOffset} is returned.
|
|
189
|
-
* @param prefix the time-zone ID, not null
|
|
190
|
-
* @param offset the offset, not null
|
|
191
|
-
* @return the zone ID, not null
|
|
192
|
-
* @throws IllegalArgumentException if the prefix is not one of
 "GMT", "UTC", or "UT", or ""
|
|
193
|
-
*/
|
|
194
|
-
ofOffset(prefix: String | string, offset: ZoneOffset): ZoneId;
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Obtains an instance of {@code ZoneId} from a temporal object.
|
|
198
|
-
* <p>
|
|
199
|
-
* This obtains a zone based on the specified temporal.
|
|
200
|
-
* A {@code TemporalAccessor} represents an arbitrary set of date and time information,
|
|
201
|
-
* which this factory converts to an instance of {@code ZoneId}.
|
|
202
|
-
* <p>
|
|
203
|
-
* A {@code TemporalAccessor} represents some form of date and time information.
|
|
204
|
-
* This factory converts the arbitrary temporal object to an instance of {@code ZoneId}.
|
|
205
|
-
* <p>
|
|
206
|
-
* The conversion will try to obtain the zone in a way that favours region-based
|
|
207
|
-
* zones over offset-based zones using {@link TemporalQueries#zone()}.
|
|
208
|
-
* <p>
|
|
209
|
-
* This method matches the signature of the functional interface {@link TemporalQuery}
|
|
210
|
-
* allowing it to be used as a query via method reference, {@code ZoneId::from}.
|
|
211
|
-
* @param temporal the temporal object to convert, not null
|
|
212
|
-
* @return the zone ID, not null
|
|
213
|
-
* @throws DateTimeException if unable to convert to a {@code ZoneId}
|
|
214
|
-
*/
|
|
215
|
-
from(temporal: TemporalAccessor): ZoneId;
|
|
216
|
-
|
|
217
97
|
/**
|
|
218
98
|
* Gets the unique time-zone ID.
|
|
219
99
|
* <p>
|
|
@@ -5,11 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _default = {
|
|
8
|
-
systemDefault: function systemDefault() {},
|
|
9
|
-
getAvailableZoneIds: function getAvailableZoneIds() {},
|
|
10
|
-
of: function of() {},
|
|
11
|
-
ofOffset: function ofOffset() {},
|
|
12
|
-
from: function from() {},
|
|
13
8
|
getId: function getId() {},
|
|
14
9
|
getDisplayName: function getDisplayName() {},
|
|
15
10
|
getRules: function getRules() {},
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { String } from "../../lang/String";
|
|
2
|
-
|
|
3
|
-
import type { TemporalAccessor } from "../temporal/TemporalAccessor";
|
|
4
2
|
import type { ZoneRules } from "../zone/ZoneRules";
|
|
5
3
|
import type { TemporalField } from "../temporal/TemporalField";
|
|
6
4
|
|
|
@@ -11,6 +9,7 @@ import type { TemporalQuery } from "../temporal/TemporalQuery";
|
|
|
11
9
|
import type { Temporal } from "../temporal/Temporal";
|
|
12
10
|
import type { Object } from "../../lang/Object";
|
|
13
11
|
import type { ZoneId } from "../ZoneId";
|
|
12
|
+
import type { TemporalAccessor } from "../temporal/TemporalAccessor";
|
|
14
13
|
import type { TemporalAdjuster } from "../temporal/TemporalAdjuster";
|
|
15
14
|
import type { Comparable } from "../../lang/Comparable";
|
|
16
15
|
import type { Serializable } from "../../io/Serializable";
|
|
@@ -58,108 +57,6 @@ export type ZoneOffset = ZoneId &
|
|
|
58
57
|
TemporalAdjuster &
|
|
59
58
|
Comparable &
|
|
60
59
|
Serializable & {
|
|
61
|
-
/**
|
|
62
|
-
* Obtains an instance of {@code ZoneOffset} using the ID.
|
|
63
|
-
* <p>
|
|
64
|
-
* This method parses the string ID of a {@code ZoneOffset} to
|
|
65
|
-
* return an instance. The parsing accepts all the formats generated by
|
|
66
|
-
* {@link #getId()}, plus some additional formats:
|
|
67
|
-
* <ul>
|
|
68
|
-
* <li>{@code Z} - for UTC
|
|
69
|
-
* <li>{@code +h}
|
|
70
|
-
* <li>{@code +hh}
|
|
71
|
-
* <li>{@code +hh:mm}
|
|
72
|
-
* <li>{@code -hh:mm}
|
|
73
|
-
* <li>{@code +hhmm}
|
|
74
|
-
* <li>{@code -hhmm}
|
|
75
|
-
* <li>{@code +hh:mm:ss}
|
|
76
|
-
* <li>{@code -hh:mm:ss}
|
|
77
|
-
* <li>{@code +hhmmss}
|
|
78
|
-
* <li>{@code -hhmmss}
|
|
79
|
-
* </ul>
|
|
80
|
-
* Note that ± means either the plus or minus symbol.
|
|
81
|
-
* <p>
|
|
82
|
-
* The ID of the returned offset will be normalized to one of the formats
|
|
83
|
-
* described by {@link #getId()}.
|
|
84
|
-
* <p>
|
|
85
|
-
* The maximum supported range is from +18:00 to -18:00 inclusive.
|
|
86
|
-
* @param offsetId the offset ID, not null
|
|
87
|
-
* @return the zone-offset, not null
|
|
88
|
-
* @throws DateTimeException if the offset ID is invalid
|
|
89
|
-
*/
|
|
90
|
-
of(offsetId: String | string): ZoneOffset;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Obtains an instance of {@code ZoneOffset} using an offset in hours.
|
|
94
|
-
* @param hours the time-zone offset in hours, from -18 to +18
|
|
95
|
-
* @return the zone-offset, not null
|
|
96
|
-
* @throws DateTimeException if the offset is not in the required range
|
|
97
|
-
*/
|
|
98
|
-
ofHours(hours: number): ZoneOffset;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Obtains an instance of {@code ZoneOffset} using an offset in
|
|
102
|
-
* hours and minutes.
|
|
103
|
-
* <p>
|
|
104
|
-
* The sign of the hours and minutes components must match.
|
|
105
|
-
* Thus, if the hours is negative, the minutes must be negative or zero.
|
|
106
|
-
* If the hours is zero, the minutes may be positive, negative or zero.
|
|
107
|
-
* @param hours the time-zone offset in hours, from -18 to +18
|
|
108
|
-
* @param minutes the time-zone offset in minutes, from 0 to ±59, sign matches hours
|
|
109
|
-
* @return the zone-offset, not null
|
|
110
|
-
* @throws DateTimeException if the offset is not in the required range
|
|
111
|
-
*/
|
|
112
|
-
ofHoursMinutes(hours: number, minutes: number): ZoneOffset;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Obtains an instance of {@code ZoneOffset} using an offset in
|
|
116
|
-
* hours, minutes and seconds.
|
|
117
|
-
* <p>
|
|
118
|
-
* The sign of the hours, minutes and seconds components must match.
|
|
119
|
-
* Thus, if the hours is negative, the minutes and seconds must be negative or zero.
|
|
120
|
-
* @param hours the time-zone offset in hours, from -18 to +18
|
|
121
|
-
* @param minutes the time-zone offset in minutes, from 0 to ±59, sign matches hours and seconds
|
|
122
|
-
* @param seconds the time-zone offset in seconds, from 0 to ±59, sign matches hours and minutes
|
|
123
|
-
* @return the zone-offset, not null
|
|
124
|
-
* @throws DateTimeException if the offset is not in the required range
|
|
125
|
-
*/
|
|
126
|
-
ofHoursMinutesSeconds(
|
|
127
|
-
hours: number,
|
|
128
|
-
minutes: number,
|
|
129
|
-
seconds: number
|
|
130
|
-
): ZoneOffset;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Obtains an instance of {@code ZoneOffset} from a temporal object.
|
|
134
|
-
* <p>
|
|
135
|
-
* This obtains an offset based on the specified temporal.
|
|
136
|
-
* A {@code TemporalAccessor} represents an arbitrary set of date and time information,
|
|
137
|
-
* which this factory converts to an instance of {@code ZoneOffset}.
|
|
138
|
-
* <p>
|
|
139
|
-
* A {@code TemporalAccessor} represents some form of date and time information.
|
|
140
|
-
* This factory converts the arbitrary temporal object to an instance of {@code ZoneOffset}.
|
|
141
|
-
* <p>
|
|
142
|
-
* The conversion uses the {@link TemporalQueries#offset()} query, which relies
|
|
143
|
-
* on extracting the {@link ChronoField#OFFSET_SECONDS OFFSET_SECONDS} field.
|
|
144
|
-
* <p>
|
|
145
|
-
* This method matches the signature of the functional interface {@link TemporalQuery}
|
|
146
|
-
* allowing it to be used as a query via method reference, {@code ZoneOffset::from}.
|
|
147
|
-
* @param temporal the temporal object to convert, not null
|
|
148
|
-
* @return the zone-offset, not null
|
|
149
|
-
* @throws DateTimeException if unable to convert to an {@code ZoneOffset}
|
|
150
|
-
*/
|
|
151
|
-
from(temporal: TemporalAccessor): ZoneOffset;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Obtains an instance of {@code ZoneOffset} specifying the total offset in seconds
|
|
155
|
-
* <p>
|
|
156
|
-
* The offset must be in the range {@code -18:00} to {@code +18:00}, which corresponds to -64800 to +64800.
|
|
157
|
-
* @param totalSeconds the total time-zone offset in seconds, from -64800 to +64800
|
|
158
|
-
* @return the ZoneOffset, not null
|
|
159
|
-
* @throws DateTimeException if the offset is not in the required range
|
|
160
|
-
*/
|
|
161
|
-
ofTotalSeconds(totalSeconds: number): ZoneOffset;
|
|
162
|
-
|
|
163
60
|
/**
|
|
164
61
|
* Gets the total zone offset in seconds.
|
|
165
62
|
* <p>
|
|
@@ -5,12 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _default = {
|
|
8
|
-
of: function of() {},
|
|
9
|
-
ofHours: function ofHours() {},
|
|
10
|
-
ofHoursMinutes: function ofHoursMinutes() {},
|
|
11
|
-
ofHoursMinutesSeconds: function ofHoursMinutesSeconds() {},
|
|
12
|
-
from: function from() {},
|
|
13
|
-
ofTotalSeconds: function ofTotalSeconds() {},
|
|
14
8
|
getTotalSeconds: function getTotalSeconds() {},
|
|
15
9
|
getId: function getId() {},
|
|
16
10
|
getRules: function getRules() {},
|
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
import type { ZoneId } from "../ZoneId";
|
|
2
|
-
import type { Clock } from "../Clock";
|
|
3
|
-
import type { LocalDate } from "../LocalDate";
|
|
4
|
-
import type { LocalTime } from "../LocalTime";
|
|
5
|
-
import type { LocalDateTime } from "../LocalDateTime";
|
|
6
|
-
|
|
7
|
-
import type { ZoneOffset } from "../ZoneOffset";
|
|
8
|
-
import type { Instant } from "../Instant";
|
|
9
|
-
import type { TemporalAccessor } from "../temporal/TemporalAccessor";
|
|
10
|
-
import type { CharSequence } from "../../lang/CharSequence";
|
|
11
|
-
import type { DateTimeFormatter } from "../format/DateTimeFormatter";
|
|
12
1
|
import type { TemporalField } from "../temporal/TemporalField";
|
|
13
2
|
|
|
14
3
|
import type { TemporalUnit } from "../temporal/TemporalUnit";
|
|
15
4
|
import type { ValueRange } from "../temporal/ValueRange";
|
|
16
5
|
|
|
6
|
+
import type { ZoneOffset } from "../ZoneOffset";
|
|
7
|
+
import type { ZoneId } from "../ZoneId";
|
|
8
|
+
import type { LocalDateTime } from "../LocalDateTime";
|
|
9
|
+
import type { LocalDate } from "../LocalDate";
|
|
17
10
|
import type { Month } from "../Month";
|
|
18
11
|
import type { DayOfWeek } from "../DayOfWeek";
|
|
12
|
+
import type { LocalTime } from "../LocalTime";
|
|
19
13
|
import type { TemporalAdjuster } from "../temporal/TemporalAdjuster";
|
|
20
14
|
import type { TemporalAmount } from "../temporal/TemporalAmount";
|
|
21
15
|
import type { TemporalQuery } from "../temporal/TemporalQuery";
|
|
22
16
|
|
|
23
17
|
import type { Temporal } from "../temporal/Temporal";
|
|
18
|
+
import type { DateTimeFormatter } from "../format/DateTimeFormatter";
|
|
24
19
|
import type { String } from "../../lang/String";
|
|
25
20
|
import type { OffsetDateTime } from "../OffsetDateTime";
|
|
26
21
|
import type { Object } from "../../lang/Object";
|
|
@@ -92,279 +87,6 @@ export type ZonedDateTime = Object &
|
|
|
92
87
|
Temporal &
|
|
93
88
|
ChronoZonedDateTime &
|
|
94
89
|
Serializable & {
|
|
95
|
-
/**
|
|
96
|
-
* Obtains the current date-time from the system clock in the default time-zone.
|
|
97
|
-
* <p>
|
|
98
|
-
* This will query the {@link Clock#systemDefaultZone() system clock} in the default
|
|
99
|
-
* time-zone to obtain the current date-time.
|
|
100
|
-
* The zone and offset will be set based on the time-zone in the clock.
|
|
101
|
-
* <p>
|
|
102
|
-
* Using this method will prevent the ability to use an alternate clock for testing
|
|
103
|
-
* because the clock is hard-coded.
|
|
104
|
-
* @return the current date-time using the system clock, not null
|
|
105
|
-
*/
|
|
106
|
-
now(): ZonedDateTime;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Obtains the current date-time from the system clock in the specified time-zone.
|
|
110
|
-
* <p>
|
|
111
|
-
* This will query the {@link Clock#system(ZoneId) system clock} to obtain the current date-time.
|
|
112
|
-
* Specifying the time-zone avoids dependence on the default time-zone.
|
|
113
|
-
* The offset will be calculated from the specified time-zone.
|
|
114
|
-
* <p>
|
|
115
|
-
* Using this method will prevent the ability to use an alternate clock for testing
|
|
116
|
-
* because the clock is hard-coded.
|
|
117
|
-
* @param zone the zone ID to use, not null
|
|
118
|
-
* @return the current date-time using the system clock, not null
|
|
119
|
-
*/
|
|
120
|
-
now(zone: ZoneId): ZonedDateTime;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Obtains the current date-time from the specified clock.
|
|
124
|
-
* <p>
|
|
125
|
-
* This will query the specified clock to obtain the current date-time.
|
|
126
|
-
* The zone and offset will be set based on the time-zone in the clock.
|
|
127
|
-
* <p>
|
|
128
|
-
* Using this method allows the use of an alternate clock for testing.
|
|
129
|
-
* The alternate clock may be introduced using {@link Clock dependency injection}.
|
|
130
|
-
* @param clock the clock to use, not null
|
|
131
|
-
* @return the current date-time, not null
|
|
132
|
-
*/
|
|
133
|
-
now(clock: Clock): ZonedDateTime;
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Obtains an instance of {@code ZonedDateTime} from a local date and time.
|
|
137
|
-
* <p>
|
|
138
|
-
* This creates a zoned date-time matching the input local date and time as closely as possible.
|
|
139
|
-
* Time-zone rules, such as daylight savings, mean that not every local date-time
|
|
140
|
-
* is valid for the specified zone, thus the local date-time may be adjusted.
|
|
141
|
-
* <p>
|
|
142
|
-
* The local date time and first combined to form a local date-time.
|
|
143
|
-
* The local date-time is then resolved to a single instant on the time-line.
|
|
144
|
-
* This is achieved by finding a valid offset from UTC/Greenwich for the local
|
|
145
|
-
* date-time as defined by the {@link ZoneRules rules} of the zone ID.
|
|
146
|
-
* <p>
|
|
147
|
-
* In most cases, there is only one valid offset for a local date-time.
|
|
148
|
-
* In the case of an overlap, when clocks are set back, there are two valid offsets.
|
|
149
|
-
* This method uses the earlier offset typically corresponding to "summer".
|
|
150
|
-
* <p>
|
|
151
|
-
* In the case of a gap, when clocks jump forward, there is no valid offset.
|
|
152
|
-
* Instead, the local date-time is adjusted to be later by the length of the gap.
|
|
153
|
-
* For a typical one hour daylight savings change, the local date-time will be
|
|
154
|
-
* moved one hour later into the offset typically corresponding to "summer".
|
|
155
|
-
* @param date the local date, not null
|
|
156
|
-
* @param time the local time, not null
|
|
157
|
-
* @param zone the time-zone, not null
|
|
158
|
-
* @return the offset date-time, not null
|
|
159
|
-
*/
|
|
160
|
-
of(date: LocalDate, time: LocalTime, zone: ZoneId): ZonedDateTime;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Obtains an instance of {@code ZonedDateTime} from a local date-time.
|
|
164
|
-
* <p>
|
|
165
|
-
* This creates a zoned date-time matching the input local date-time as closely as possible.
|
|
166
|
-
* Time-zone rules, such as daylight savings, mean that not every local date-time
|
|
167
|
-
* is valid for the specified zone, thus the local date-time may be adjusted.
|
|
168
|
-
* <p>
|
|
169
|
-
* The local date-time is resolved to a single instant on the time-line.
|
|
170
|
-
* This is achieved by finding a valid offset from UTC/Greenwich for the local
|
|
171
|
-
* date-time as defined by the {@link ZoneRules rules} of the zone ID.
|
|
172
|
-
* <p>
|
|
173
|
-
* In most cases, there is only one valid offset for a local date-time.
|
|
174
|
-
* In the case of an overlap, when clocks are set back, there are two valid offsets.
|
|
175
|
-
* This method uses the earlier offset typically corresponding to "summer".
|
|
176
|
-
* <p>
|
|
177
|
-
* In the case of a gap, when clocks jump forward, there is no valid offset.
|
|
178
|
-
* Instead, the local date-time is adjusted to be later by the length of the gap.
|
|
179
|
-
* For a typical one hour daylight savings change, the local date-time will be
|
|
180
|
-
* moved one hour later into the offset typically corresponding to "summer".
|
|
181
|
-
* @param localDateTime the local date-time, not null
|
|
182
|
-
* @param zone the time-zone, not null
|
|
183
|
-
* @return the zoned date-time, not null
|
|
184
|
-
*/
|
|
185
|
-
of(localDateTime: LocalDateTime, zone: ZoneId): ZonedDateTime;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Obtains an instance of {@code ZonedDateTime} from a year, month, day,
|
|
189
|
-
* hour, minute, second, nanosecond and time-zone.
|
|
190
|
-
* <p>
|
|
191
|
-
* This creates a zoned date-time matching the local date-time of the seven
|
|
192
|
-
* specified fields as closely as possible.
|
|
193
|
-
* Time-zone rules, such as daylight savings, mean that not every local date-time
|
|
194
|
-
* is valid for the specified zone, thus the local date-time may be adjusted.
|
|
195
|
-
* <p>
|
|
196
|
-
* The local date-time is resolved to a single instant on the time-line.
|
|
197
|
-
* This is achieved by finding a valid offset from UTC/Greenwich for the local
|
|
198
|
-
* date-time as defined by the {@link ZoneRules rules} of the zone ID.
|
|
199
|
-
* <p>
|
|
200
|
-
* In most cases, there is only one valid offset for a local date-time.
|
|
201
|
-
* In the case of an overlap, when clocks are set back, there are two valid offsets.
|
|
202
|
-
* This method uses the earlier offset typically corresponding to "summer".
|
|
203
|
-
* <p>
|
|
204
|
-
* In the case of a gap, when clocks jump forward, there is no valid offset.
|
|
205
|
-
* Instead, the local date-time is adjusted to be later by the length of the gap.
|
|
206
|
-
* For a typical one hour daylight savings change, the local date-time will be
|
|
207
|
-
* moved one hour later into the offset typically corresponding to "summer".
|
|
208
|
-
* <p>
|
|
209
|
-
* This method exists primarily for writing test cases.
|
|
210
|
-
* Non test-code will typically use other methods to create an offset time.
|
|
211
|
-
* {@code LocalDateTime} has five additional convenience variants of the
|
|
212
|
-
* equivalent factory method taking fewer arguments.
|
|
213
|
-
* They are not provided here to reduce the footprint of the API.
|
|
214
|
-
* @param year the year to represent, from MIN_YEAR to MAX_YEAR
|
|
215
|
-
* @param month the month-of-year to represent, from 1 (January) to 12 (December)
|
|
216
|
-
* @param dayOfMonth the day-of-month to represent, from 1 to 31
|
|
217
|
-
* @param hour the hour-of-day to represent, from 0 to 23
|
|
218
|
-
* @param minute the minute-of-hour to represent, from 0 to 59
|
|
219
|
-
* @param second the second-of-minute to represent, from 0 to 59
|
|
220
|
-
* @param nanoOfSecond the nano-of-second to represent, from 0 to 999,999,999
|
|
221
|
-
* @param zone the time-zone, not null
|
|
222
|
-
* @return the offset date-time, not null
|
|
223
|
-
* @throws DateTimeException if the value of any field is out of range, or
 if the day-of-month is invalid for the month-year
|
|
224
|
-
*/
|
|
225
|
-
of(
|
|
226
|
-
year: number,
|
|
227
|
-
month: number,
|
|
228
|
-
dayOfMonth: number,
|
|
229
|
-
hour: number,
|
|
230
|
-
minute: number,
|
|
231
|
-
second: number,
|
|
232
|
-
nanoOfSecond: number,
|
|
233
|
-
zone: ZoneId
|
|
234
|
-
): ZonedDateTime;
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Obtains an instance of {@code ZonedDateTime} from a local date-time
|
|
238
|
-
* using the preferred offset if possible.
|
|
239
|
-
* <p>
|
|
240
|
-
* The local date-time is resolved to a single instant on the time-line.
|
|
241
|
-
* This is achieved by finding a valid offset from UTC/Greenwich for the local
|
|
242
|
-
* date-time as defined by the {@link ZoneRules rules} of the zone ID.
|
|
243
|
-
* <p>
|
|
244
|
-
* In most cases, there is only one valid offset for a local date-time.
|
|
245
|
-
* In the case of an overlap, where clocks are set back, there are two valid offsets.
|
|
246
|
-
* If the preferred offset is one of the valid offsets then it is used.
|
|
247
|
-
* Otherwise the earlier valid offset is used, typically corresponding to "summer".
|
|
248
|
-
* <p>
|
|
249
|
-
* In the case of a gap, where clocks jump forward, there is no valid offset.
|
|
250
|
-
* Instead, the local date-time is adjusted to be later by the length of the gap.
|
|
251
|
-
* For a typical one hour daylight savings change, the local date-time will be
|
|
252
|
-
* moved one hour later into the offset typically corresponding to "summer".
|
|
253
|
-
* @param localDateTime the local date-time, not null
|
|
254
|
-
* @param zone the time-zone, not null
|
|
255
|
-
* @param preferredOffset the zone offset, null if no preference
|
|
256
|
-
* @return the zoned date-time, not null
|
|
257
|
-
*/
|
|
258
|
-
ofLocal(
|
|
259
|
-
localDateTime: LocalDateTime,
|
|
260
|
-
zone: ZoneId,
|
|
261
|
-
preferredOffset: ZoneOffset
|
|
262
|
-
): ZonedDateTime;
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* Obtains an instance of {@code ZonedDateTime} from an {@code Instant}.
|
|
266
|
-
* <p>
|
|
267
|
-
* This creates a zoned date-time with the same instant as that specified.
|
|
268
|
-
* Calling {@link #toInstant()} will return an instant equal to the one used here.
|
|
269
|
-
* <p>
|
|
270
|
-
* Converting an instant to a zoned date-time is simple as there is only one valid
|
|
271
|
-
* offset for each instant.
|
|
272
|
-
* @param instant the instant to create the date-time from, not null
|
|
273
|
-
* @param zone the time-zone, not null
|
|
274
|
-
* @return the zoned date-time, not null
|
|
275
|
-
* @throws DateTimeException if the result exceeds the supported range
|
|
276
|
-
*/
|
|
277
|
-
ofInstant(instant: Instant, zone: ZoneId): ZonedDateTime;
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Obtains an instance of {@code ZonedDateTime} from the instant formed by combining
|
|
281
|
-
* the local date-time and offset.
|
|
282
|
-
* <p>
|
|
283
|
-
* This creates a zoned date-time by {@link LocalDateTime#toInstant(ZoneOffset) combining}
|
|
284
|
-
* the {@code LocalDateTime} and {@code ZoneOffset}.
|
|
285
|
-
* This combination uniquely specifies an instant without ambiguity.
|
|
286
|
-
* <p>
|
|
287
|
-
* Converting an instant to a zoned date-time is simple as there is only one valid
|
|
288
|
-
* offset for each instant. If the valid offset is different to the offset specified,
|
|
289
|
-
* then the date-time and offset of the zoned date-time will differ from those specified.
|
|
290
|
-
* <p>
|
|
291
|
-
* If the {@code ZoneId} to be used is a {@code ZoneOffset}, this method is equivalent
|
|
292
|
-
* to {@link #of(LocalDateTime, ZoneId)}.
|
|
293
|
-
* @param localDateTime the local date-time, not null
|
|
294
|
-
* @param offset the zone offset, not null
|
|
295
|
-
* @param zone the time-zone, not null
|
|
296
|
-
* @return the zoned date-time, not null
|
|
297
|
-
*/
|
|
298
|
-
ofInstant(
|
|
299
|
-
localDateTime: LocalDateTime,
|
|
300
|
-
offset: ZoneOffset,
|
|
301
|
-
zone: ZoneId
|
|
302
|
-
): ZonedDateTime;
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* Obtains an instance of {@code ZonedDateTime} strictly validating the
|
|
306
|
-
* combination of local date-time, offset and zone ID.
|
|
307
|
-
* <p>
|
|
308
|
-
* This creates a zoned date-time ensuring that the offset is valid for the
|
|
309
|
-
* local date-time according to the rules of the specified zone.
|
|
310
|
-
* If the offset is invalid, an exception is thrown.
|
|
311
|
-
* @param localDateTime the local date-time, not null
|
|
312
|
-
* @param offset the zone offset, not null
|
|
313
|
-
* @param zone the time-zone, not null
|
|
314
|
-
* @return the zoned date-time, not null
|
|
315
|
-
*/
|
|
316
|
-
ofStrict(
|
|
317
|
-
localDateTime: LocalDateTime,
|
|
318
|
-
offset: ZoneOffset,
|
|
319
|
-
zone: ZoneId
|
|
320
|
-
): ZonedDateTime;
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Obtains an instance of {@code ZonedDateTime} from a temporal object.
|
|
324
|
-
* <p>
|
|
325
|
-
* This obtains a zoned date-time based on the specified temporal.
|
|
326
|
-
* A {@code TemporalAccessor} represents an arbitrary set of date and time information,
|
|
327
|
-
* which this factory converts to an instance of {@code ZonedDateTime}.
|
|
328
|
-
* <p>
|
|
329
|
-
* The conversion will first obtain a {@code ZoneId} from the temporal object,
|
|
330
|
-
* falling back to a {@code ZoneOffset} if necessary. It will then try to obtain
|
|
331
|
-
* an {@code Instant}, falling back to a {@code LocalDateTime} if necessary.
|
|
332
|
-
* The result will be either the combination of {@code ZoneId} or {@code ZoneOffset}
|
|
333
|
-
* with {@code Instant} or {@code LocalDateTime}.
|
|
334
|
-
* Implementations are permitted to perform optimizations such as accessing
|
|
335
|
-
* those fields that are equivalent to the relevant objects.
|
|
336
|
-
* <p>
|
|
337
|
-
* This method matches the signature of the functional interface {@link TemporalQuery}
|
|
338
|
-
* allowing it to be used as a query via method reference, {@code ZonedDateTime::from}.
|
|
339
|
-
* @param temporal the temporal object to convert, not null
|
|
340
|
-
* @return the zoned date-time, not null
|
|
341
|
-
* @throws DateTimeException if unable to convert to an {@code ZonedDateTime}
|
|
342
|
-
*/
|
|
343
|
-
from(temporal: TemporalAccessor): ZonedDateTime;
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Obtains an instance of {@code ZonedDateTime} from a text string such as
|
|
347
|
-
* {@code 2007-12-03T10:15:30+01:00[Europe/Paris]}.
|
|
348
|
-
* <p>
|
|
349
|
-
* The string must represent a valid date-time and is parsed using
|
|
350
|
-
* {@link java.time.format.DateTimeFormatter#ISO_ZONED_DATE_TIME}.
|
|
351
|
-
* @param text the text to parse such as "2007-12-03T10:15:30+01:00[Europe/Paris]", not null
|
|
352
|
-
* @return the parsed zoned date-time, not null
|
|
353
|
-
* @throws DateTimeParseException if the text cannot be parsed
|
|
354
|
-
*/
|
|
355
|
-
parse(text: CharSequence): ZonedDateTime;
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Obtains an instance of {@code ZonedDateTime} from a text string using a specific formatter.
|
|
359
|
-
* <p>
|
|
360
|
-
* The text is parsed using the formatter, returning a date-time.
|
|
361
|
-
* @param text the text to parse, not null
|
|
362
|
-
* @param formatter the formatter to use, not null
|
|
363
|
-
* @return the parsed zoned date-time, not null
|
|
364
|
-
* @throws DateTimeParseException if the text cannot be parsed
|
|
365
|
-
*/
|
|
366
|
-
parse(text: CharSequence, formatter: DateTimeFormatter): ZonedDateTime;
|
|
367
|
-
|
|
368
90
|
/**
|
|
369
91
|
* Checks if the specified field is supported.
|
|
370
92
|
* <p>
|
|
@@ -5,13 +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
|
-
ofLocal: function ofLocal() {},
|
|
11
|
-
ofInstant: function ofInstant() {},
|
|
12
|
-
ofStrict: function ofStrict() {},
|
|
13
|
-
from: function from() {},
|
|
14
|
-
parse: function parse() {},
|
|
15
8
|
isSupported: function isSupported() {},
|
|
16
9
|
range: function range() {},
|
|
17
10
|
get: function get() {},
|