@attocash/cli 0.1.0

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.
Files changed (400) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +707 -0
  3. package/dist/application/app.d.ts +138 -0
  4. package/dist/application/app.js +654 -0
  5. package/dist/application/operations.d.ts +9 -0
  6. package/dist/application/operations.js +96 -0
  7. package/dist/cli/cli.d.ts +1 -0
  8. package/dist/cli/cli.js +460 -0
  9. package/dist/cli/help.d.ts +4 -0
  10. package/dist/cli/help.js +49 -0
  11. package/dist/cli/main.d.ts +2 -0
  12. package/dist/cli/main.js +13 -0
  13. package/dist/cli/onboarding.d.ts +14 -0
  14. package/dist/cli/onboarding.js +144 -0
  15. package/dist/cli/output.d.ts +2 -0
  16. package/dist/cli/output.js +231 -0
  17. package/dist/cli/terminal.d.ts +6 -0
  18. package/dist/cli/terminal.js +92 -0
  19. package/dist/cli/update-check.d.ts +1 -0
  20. package/dist/cli/update-check.js +12 -0
  21. package/dist/cli/updates.d.ts +2 -0
  22. package/dist/cli/updates.js +98 -0
  23. package/dist/core.d.ts +14 -0
  24. package/dist/core.js +14 -0
  25. package/dist/doctor/credential-probe.d.ts +7 -0
  26. package/dist/doctor/credential-probe.js +49 -0
  27. package/dist/doctor/doctor.d.ts +4 -0
  28. package/dist/doctor/doctor.js +213 -0
  29. package/dist/doctor/keyring.d.ts +7 -0
  30. package/dist/doctor/keyring.js +150 -0
  31. package/dist/doctor/profile.d.ts +19 -0
  32. package/dist/doctor/profile.js +73 -0
  33. package/dist/doctor/types.d.ts +40 -0
  34. package/dist/doctor/types.js +1 -0
  35. package/dist/domain/amount.d.ts +6 -0
  36. package/dist/domain/amount.js +27 -0
  37. package/dist/domain/errors.d.ts +10 -0
  38. package/dist/domain/errors.js +16 -0
  39. package/dist/labels/directory.d.ts +87 -0
  40. package/dist/labels/directory.js +140 -0
  41. package/dist/labels/personal.d.ts +17 -0
  42. package/dist/labels/personal.js +56 -0
  43. package/dist/labels/presentation.d.ts +154 -0
  44. package/dist/labels/presentation.js +90 -0
  45. package/dist/network/reader.d.ts +31 -0
  46. package/dist/network/reader.js +370 -0
  47. package/dist/network/retry.d.ts +7 -0
  48. package/dist/network/retry.js +53 -0
  49. package/dist/network/work.d.ts +3 -0
  50. package/dist/network/work.js +66 -0
  51. package/dist/pricing/market.d.ts +29 -0
  52. package/dist/pricing/market.js +150 -0
  53. package/dist/pricing/terms.d.ts +6 -0
  54. package/dist/pricing/terms.js +12 -0
  55. package/dist/spending/destination.d.ts +16 -0
  56. package/dist/spending/destination.js +42 -0
  57. package/dist/spending/journal.d.ts +28 -0
  58. package/dist/spending/journal.js +69 -0
  59. package/dist/spending/ledger.d.ts +118 -0
  60. package/dist/spending/ledger.js +444 -0
  61. package/dist/spending/payments.d.ts +67 -0
  62. package/dist/spending/payments.js +424 -0
  63. package/dist/spending/pool.d.ts +13 -0
  64. package/dist/spending/pool.js +38 -0
  65. package/dist/spending/reconcile.d.ts +18 -0
  66. package/dist/spending/reconcile.js +64 -0
  67. package/dist/storage/profiles.d.ts +13 -0
  68. package/dist/storage/profiles.js +86 -0
  69. package/dist/storage/secrets.d.ts +16 -0
  70. package/dist/storage/secrets.js +104 -0
  71. package/dist/storage/state.d.ts +32 -0
  72. package/dist/storage/state.js +255 -0
  73. package/dist/wallet/auto-receive.d.ts +57 -0
  74. package/dist/wallet/auto-receive.js +140 -0
  75. package/dist/wallet/defaults.d.ts +3 -0
  76. package/dist/wallet/defaults.js +26 -0
  77. package/dist/wallet/signing.d.ts +17 -0
  78. package/dist/wallet/signing.js +128 -0
  79. package/dist/wallet/types.d.ts +65 -0
  80. package/dist/wallet/types.js +1 -0
  81. package/dist/wallet/work.d.ts +29 -0
  82. package/dist/wallet/work.js +154 -0
  83. package/dist/watches/manager.d.ts +75 -0
  84. package/dist/watches/manager.js +197 -0
  85. package/node_modules/@attocash/commons-core/Kotlin-DateTime-library-kotlinx-datetime.mjs +6678 -0
  86. package/node_modules/@attocash/commons-core/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -0
  87. package/node_modules/@attocash/commons-core/LICENSE +28 -0
  88. package/node_modules/@attocash/commons-core/README.md +118 -0
  89. package/node_modules/@attocash/commons-core/commons-commons-core.d.mts +1036 -0
  90. package/node_modules/@attocash/commons-core/commons-commons-core.mjs +7701 -0
  91. package/node_modules/@attocash/commons-core/commons-commons-core.mjs.map +1 -0
  92. package/node_modules/@attocash/commons-core/kotlin-kotlin-stdlib.mjs +17681 -0
  93. package/node_modules/@attocash/commons-core/kotlin-kotlin-stdlib.mjs.map +1 -0
  94. package/node_modules/@attocash/commons-core/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs +4 -0
  95. package/node_modules/@attocash/commons-core/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -0
  96. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-bytestring.mjs +209 -0
  97. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -0
  98. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-core.mjs +2284 -0
  99. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-core.mjs.map +1 -0
  100. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-core.mjs +6042 -0
  101. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -0
  102. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  103. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  104. package/node_modules/@attocash/commons-core/package.json +27 -0
  105. package/node_modules/@attocash/commons-node/LICENSE +28 -0
  106. package/node_modules/@attocash/commons-node/README.md +92 -0
  107. package/node_modules/@attocash/commons-node/commons-commons-node.d.mts +255 -0
  108. package/node_modules/@attocash/commons-node/commons-commons-node.mjs +2977 -0
  109. package/node_modules/@attocash/commons-node/commons-commons-node.mjs.map +1 -0
  110. package/node_modules/@attocash/commons-node/kotlin-logging.mjs +432 -0
  111. package/node_modules/@attocash/commons-node/kotlin-logging.mjs.map +1 -0
  112. package/node_modules/@attocash/commons-node/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  113. package/node_modules/@attocash/commons-node/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  114. package/node_modules/@attocash/commons-node/package.json +29 -0
  115. package/node_modules/@attocash/commons-node-remote/LICENSE +28 -0
  116. package/node_modules/@attocash/commons-node-remote/README.md +61 -0
  117. package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.d.mts +122 -0
  118. package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.mjs +1810 -0
  119. package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.mjs.map +1 -0
  120. package/node_modules/@attocash/commons-node-remote/kotlin-logging.mjs +432 -0
  121. package/node_modules/@attocash/commons-node-remote/kotlin-logging.mjs.map +1 -0
  122. package/node_modules/@attocash/commons-node-remote/kotlinx-browser.mjs +8 -0
  123. package/node_modules/@attocash/commons-node-remote/kotlinx-browser.mjs.map +1 -0
  124. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  125. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
  126. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  127. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  128. package/node_modules/@attocash/commons-node-remote/package.json +31 -0
  129. package/node_modules/@attocash/commons-transport/LICENSE +28 -0
  130. package/node_modules/@attocash/commons-transport/README.md +5 -0
  131. package/node_modules/@attocash/commons-transport/commons-commons-transport.d.mts +64 -0
  132. package/node_modules/@attocash/commons-transport/commons-commons-transport.mjs +249 -0
  133. package/node_modules/@attocash/commons-transport/commons-commons-transport.mjs.map +1 -0
  134. package/node_modules/@attocash/commons-transport/kotlinx-atomicfu.mjs +263 -0
  135. package/node_modules/@attocash/commons-transport/kotlinx-atomicfu.mjs.map +1 -0
  136. package/node_modules/@attocash/commons-transport/kotlinx-browser.mjs +8 -0
  137. package/node_modules/@attocash/commons-transport/kotlinx-browser.mjs.map +1 -0
  138. package/node_modules/@attocash/commons-transport/kotlinx-coroutines-core.mjs +11604 -0
  139. package/node_modules/@attocash/commons-transport/kotlinx-coroutines-core.mjs.map +1 -0
  140. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  141. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
  142. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  143. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  144. package/node_modules/@attocash/commons-transport/ktor-ktor-client-content-negotiation.mjs +499 -0
  145. package/node_modules/@attocash/commons-transport/ktor-ktor-client-content-negotiation.mjs.map +1 -0
  146. package/node_modules/@attocash/commons-transport/ktor-ktor-client-core.mjs +6456 -0
  147. package/node_modules/@attocash/commons-transport/ktor-ktor-client-core.mjs.map +1 -0
  148. package/node_modules/@attocash/commons-transport/ktor-ktor-events.mjs +83 -0
  149. package/node_modules/@attocash/commons-transport/ktor-ktor-events.mjs.map +1 -0
  150. package/node_modules/@attocash/commons-transport/ktor-ktor-http-cio.mjs +1714 -0
  151. package/node_modules/@attocash/commons-transport/ktor-ktor-http-cio.mjs.map +1 -0
  152. package/node_modules/@attocash/commons-transport/ktor-ktor-http.mjs +3197 -0
  153. package/node_modules/@attocash/commons-transport/ktor-ktor-http.mjs.map +1 -0
  154. package/node_modules/@attocash/commons-transport/ktor-ktor-io.mjs +2290 -0
  155. package/node_modules/@attocash/commons-transport/ktor-ktor-io.mjs.map +1 -0
  156. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx-json.mjs +46 -0
  157. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx-json.mjs.map +1 -0
  158. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx.mjs +482 -0
  159. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx.mjs.map +1 -0
  160. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization.mjs +165 -0
  161. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization.mjs.map +1 -0
  162. package/node_modules/@attocash/commons-transport/ktor-ktor-sse.mjs +4 -0
  163. package/node_modules/@attocash/commons-transport/ktor-ktor-sse.mjs.map +1 -0
  164. package/node_modules/@attocash/commons-transport/ktor-ktor-utils.mjs +3222 -0
  165. package/node_modules/@attocash/commons-transport/ktor-ktor-utils.mjs.map +1 -0
  166. package/node_modules/@attocash/commons-transport/ktor-ktor-websocket-serialization.mjs +4 -0
  167. package/node_modules/@attocash/commons-transport/ktor-ktor-websocket-serialization.mjs.map +1 -0
  168. package/node_modules/@attocash/commons-transport/ktor-ktor-websockets.mjs +1485 -0
  169. package/node_modules/@attocash/commons-transport/ktor-ktor-websockets.mjs.map +1 -0
  170. package/node_modules/@attocash/commons-transport/package.json +29 -0
  171. package/node_modules/@attocash/commons-worker/LICENSE +28 -0
  172. package/node_modules/@attocash/commons-worker/README.md +48 -0
  173. package/node_modules/@attocash/commons-worker/commons-commons-worker.d.mts +73 -0
  174. package/node_modules/@attocash/commons-worker/commons-commons-worker.mjs +702 -0
  175. package/node_modules/@attocash/commons-worker/commons-commons-worker.mjs.map +1 -0
  176. package/node_modules/@attocash/commons-worker/kotlin-logging.mjs +432 -0
  177. package/node_modules/@attocash/commons-worker/kotlin-logging.mjs.map +1 -0
  178. package/node_modules/@attocash/commons-worker/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  179. package/node_modules/@attocash/commons-worker/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  180. package/node_modules/@attocash/commons-worker/package.json +29 -0
  181. package/node_modules/@attocash/commons-worker-remote/LICENSE +28 -0
  182. package/node_modules/@attocash/commons-worker-remote/README.md +60 -0
  183. package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.d.mts +93 -0
  184. package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.mjs +289 -0
  185. package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.mjs.map +1 -0
  186. package/node_modules/@attocash/commons-worker-remote/kotlin-logging.mjs +432 -0
  187. package/node_modules/@attocash/commons-worker-remote/kotlin-logging.mjs.map +1 -0
  188. package/node_modules/@attocash/commons-worker-remote/kotlinx-browser.mjs +8 -0
  189. package/node_modules/@attocash/commons-worker-remote/kotlinx-browser.mjs.map +1 -0
  190. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  191. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
  192. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  193. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  194. package/node_modules/@attocash/commons-worker-remote/package.json +31 -0
  195. package/node_modules/@js-joda/core/CHANGELOG.md +363 -0
  196. package/node_modules/@js-joda/core/CheatSheet.md +947 -0
  197. package/node_modules/@js-joda/core/LICENSE +34 -0
  198. package/node_modules/@js-joda/core/README.md +155 -0
  199. package/node_modules/@js-joda/core/bower.json +21 -0
  200. package/node_modules/@js-joda/core/dist/js-joda.d.ts +2452 -0
  201. package/node_modules/@js-joda/core/dist/js-joda.esm.js +13564 -0
  202. package/node_modules/@js-joda/core/dist/js-joda.flow.js +949 -0
  203. package/node_modules/@js-joda/core/dist/js-joda.js +13630 -0
  204. package/node_modules/@js-joda/core/dist/js-joda.js.map +1 -0
  205. package/node_modules/@js-joda/core/dist/js-joda.min.js +5 -0
  206. package/node_modules/@js-joda/core/package.json +76 -0
  207. package/node_modules/@js-joda/core/src/Clock.js +330 -0
  208. package/node_modules/@js-joda/core/src/DayOfWeek.js +451 -0
  209. package/node_modules/@js-joda/core/src/Duration.js +1205 -0
  210. package/node_modules/@js-joda/core/src/Enum.js +30 -0
  211. package/node_modules/@js-joda/core/src/Instant.js +1012 -0
  212. package/node_modules/@js-joda/core/src/LocalDate.js +1703 -0
  213. package/node_modules/@js-joda/core/src/LocalDateTime.js +1686 -0
  214. package/node_modules/@js-joda/core/src/LocalTime.js +1415 -0
  215. package/node_modules/@js-joda/core/src/MathUtil.js +236 -0
  216. package/node_modules/@js-joda/core/src/Month.js +600 -0
  217. package/node_modules/@js-joda/core/src/MonthDay.js +730 -0
  218. package/node_modules/@js-joda/core/src/OffsetDateTime.js +757 -0
  219. package/node_modules/@js-joda/core/src/OffsetTime.js +621 -0
  220. package/node_modules/@js-joda/core/src/Period.js +933 -0
  221. package/node_modules/@js-joda/core/src/StringUtil.js +43 -0
  222. package/node_modules/@js-joda/core/src/Year.js +1015 -0
  223. package/node_modules/@js-joda/core/src/YearConstants.js +21 -0
  224. package/node_modules/@js-joda/core/src/YearMonth.js +1096 -0
  225. package/node_modules/@js-joda/core/src/ZoneId.js +236 -0
  226. package/node_modules/@js-joda/core/src/ZoneIdFactory.js +201 -0
  227. package/node_modules/@js-joda/core/src/ZoneOffset.js +486 -0
  228. package/node_modules/@js-joda/core/src/ZoneRegion.js +72 -0
  229. package/node_modules/@js-joda/core/src/ZonedDateTime.js +2007 -0
  230. package/node_modules/@js-joda/core/src/_init.js +68 -0
  231. package/node_modules/@js-joda/core/src/assert.js +33 -0
  232. package/node_modules/@js-joda/core/src/chrono/ChronoLocalDate.js +230 -0
  233. package/node_modules/@js-joda/core/src/chrono/ChronoLocalDateTime.js +130 -0
  234. package/node_modules/@js-joda/core/src/chrono/ChronoZonedDateTime.js +194 -0
  235. package/node_modules/@js-joda/core/src/chrono/IsoChronology.js +235 -0
  236. package/node_modules/@js-joda/core/src/convert.js +83 -0
  237. package/node_modules/@js-joda/core/src/errors.js +54 -0
  238. package/node_modules/@js-joda/core/src/format/DateTimeBuilder.js +535 -0
  239. package/node_modules/@js-joda/core/src/format/DateTimeFormatter.js +728 -0
  240. package/node_modules/@js-joda/core/src/format/DateTimeFormatterBuilder.js +1545 -0
  241. package/node_modules/@js-joda/core/src/format/DateTimeParseContext.js +297 -0
  242. package/node_modules/@js-joda/core/src/format/DateTimePrintContext.js +138 -0
  243. package/node_modules/@js-joda/core/src/format/DecimalStyle.js +113 -0
  244. package/node_modules/@js-joda/core/src/format/EnumMap.js +70 -0
  245. package/node_modules/@js-joda/core/src/format/ParsePosition.js +31 -0
  246. package/node_modules/@js-joda/core/src/format/ResolverStyle.js +93 -0
  247. package/node_modules/@js-joda/core/src/format/SignStyle.js +38 -0
  248. package/node_modules/@js-joda/core/src/format/StringBuilder.js +47 -0
  249. package/node_modules/@js-joda/core/src/format/TextStyle.js +114 -0
  250. package/node_modules/@js-joda/core/src/format/parser/CharLiteralPrinterParser.js +46 -0
  251. package/node_modules/@js-joda/core/src/format/parser/CompositePrinterParser.js +89 -0
  252. package/node_modules/@js-joda/core/src/format/parser/FractionPrinterParser.js +162 -0
  253. package/node_modules/@js-joda/core/src/format/parser/NumberPrinterParser.js +367 -0
  254. package/node_modules/@js-joda/core/src/format/parser/OffsetIdPrinterParser.js +177 -0
  255. package/node_modules/@js-joda/core/src/format/parser/PadPrinterParserDecorator.js +81 -0
  256. package/node_modules/@js-joda/core/src/format/parser/SettingsParser.js +44 -0
  257. package/node_modules/@js-joda/core/src/format/parser/StringLiteralPrinterParser.js +39 -0
  258. package/node_modules/@js-joda/core/src/format/parser/ZoneIdPrinterParser.js +218 -0
  259. package/node_modules/@js-joda/core/src/js-joda.js +210 -0
  260. package/node_modules/@js-joda/core/src/license-preamble.js +3 -0
  261. package/node_modules/@js-joda/core/src/temporal/ChronoField.js +470 -0
  262. package/node_modules/@js-joda/core/src/temporal/ChronoUnit.js +310 -0
  263. package/node_modules/@js-joda/core/src/temporal/DefaultInterfaceTemporal.js +118 -0
  264. package/node_modules/@js-joda/core/src/temporal/IsoFields.js +859 -0
  265. package/node_modules/@js-joda/core/src/temporal/NativeJsTemporal.js +105 -0
  266. package/node_modules/@js-joda/core/src/temporal/Temporal.js +346 -0
  267. package/node_modules/@js-joda/core/src/temporal/TemporalAccessor.js +125 -0
  268. package/node_modules/@js-joda/core/src/temporal/TemporalAdjuster.js +92 -0
  269. package/node_modules/@js-joda/core/src/temporal/TemporalAdjusters.js +464 -0
  270. package/node_modules/@js-joda/core/src/temporal/TemporalAmount.js +166 -0
  271. package/node_modules/@js-joda/core/src/temporal/TemporalField.js +248 -0
  272. package/node_modules/@js-joda/core/src/temporal/TemporalQueries.js +223 -0
  273. package/node_modules/@js-joda/core/src/temporal/TemporalQueriesFactory.js +77 -0
  274. package/node_modules/@js-joda/core/src/temporal/TemporalQuery.js +107 -0
  275. package/node_modules/@js-joda/core/src/temporal/TemporalUnit.js +179 -0
  276. package/node_modules/@js-joda/core/src/temporal/ValueRange.js +257 -0
  277. package/node_modules/@js-joda/core/src/use.js +20 -0
  278. package/node_modules/@js-joda/core/src/zone/SystemDefaultZoneId.js +31 -0
  279. package/node_modules/@js-joda/core/src/zone/SystemDefaultZoneRules.js +162 -0
  280. package/node_modules/@js-joda/core/src/zone/ZoneOffsetTransition.js +289 -0
  281. package/node_modules/@js-joda/core/src/zone/ZoneRules.js +464 -0
  282. package/node_modules/@js-joda/core/src/zone/ZoneRulesProvider.js +36 -0
  283. package/node_modules/@noble/hashes/LICENSE +21 -0
  284. package/node_modules/@noble/hashes/README.md +563 -0
  285. package/node_modules/@noble/hashes/_blake.d.ts +21 -0
  286. package/node_modules/@noble/hashes/_blake.d.ts.map +1 -0
  287. package/node_modules/@noble/hashes/_blake.js +52 -0
  288. package/node_modules/@noble/hashes/_blake.js.map +1 -0
  289. package/node_modules/@noble/hashes/_md.d.ts +99 -0
  290. package/node_modules/@noble/hashes/_md.d.ts.map +1 -0
  291. package/node_modules/@noble/hashes/_md.js +202 -0
  292. package/node_modules/@noble/hashes/_md.js.map +1 -0
  293. package/node_modules/@noble/hashes/_u64.d.ts +63 -0
  294. package/node_modules/@noble/hashes/_u64.d.ts.map +1 -0
  295. package/node_modules/@noble/hashes/_u64.js +84 -0
  296. package/node_modules/@noble/hashes/_u64.js.map +1 -0
  297. package/node_modules/@noble/hashes/argon2.d.ts +112 -0
  298. package/node_modules/@noble/hashes/argon2.d.ts.map +1 -0
  299. package/node_modules/@noble/hashes/argon2.js +517 -0
  300. package/node_modules/@noble/hashes/argon2.js.map +1 -0
  301. package/node_modules/@noble/hashes/blake1.d.ts +156 -0
  302. package/node_modules/@noble/hashes/blake1.d.ts.map +1 -0
  303. package/node_modules/@noble/hashes/blake1.js +560 -0
  304. package/node_modules/@noble/hashes/blake1.js.map +1 -0
  305. package/node_modules/@noble/hashes/blake2.d.ts +184 -0
  306. package/node_modules/@noble/hashes/blake2.d.ts.map +1 -0
  307. package/node_modules/@noble/hashes/blake2.js +501 -0
  308. package/node_modules/@noble/hashes/blake2.js.map +1 -0
  309. package/node_modules/@noble/hashes/blake3.d.ts +68 -0
  310. package/node_modules/@noble/hashes/blake3.d.ts.map +1 -0
  311. package/node_modules/@noble/hashes/blake3.js +284 -0
  312. package/node_modules/@noble/hashes/blake3.js.map +1 -0
  313. package/node_modules/@noble/hashes/eskdf.d.ts +92 -0
  314. package/node_modules/@noble/hashes/eskdf.d.ts.map +1 -0
  315. package/node_modules/@noble/hashes/eskdf.js +218 -0
  316. package/node_modules/@noble/hashes/eskdf.js.map +1 -0
  317. package/node_modules/@noble/hashes/hkdf.d.ts +64 -0
  318. package/node_modules/@noble/hashes/hkdf.d.ts.map +1 -0
  319. package/node_modules/@noble/hashes/hkdf.js +120 -0
  320. package/node_modules/@noble/hashes/hkdf.js.map +1 -0
  321. package/node_modules/@noble/hashes/hmac.d.ts +47 -0
  322. package/node_modules/@noble/hashes/hmac.d.ts.map +1 -0
  323. package/node_modules/@noble/hashes/hmac.js +93 -0
  324. package/node_modules/@noble/hashes/hmac.js.map +1 -0
  325. package/node_modules/@noble/hashes/index.d.ts +2 -0
  326. package/node_modules/@noble/hashes/index.d.ts.map +1 -0
  327. package/node_modules/@noble/hashes/index.js +35 -0
  328. package/node_modules/@noble/hashes/index.js.map +1 -0
  329. package/node_modules/@noble/hashes/legacy.d.ts +102 -0
  330. package/node_modules/@noble/hashes/legacy.d.ts.map +1 -0
  331. package/node_modules/@noble/hashes/legacy.js +327 -0
  332. package/node_modules/@noble/hashes/legacy.js.map +1 -0
  333. package/node_modules/@noble/hashes/package.json +97 -0
  334. package/node_modules/@noble/hashes/pbkdf2.d.ts +56 -0
  335. package/node_modules/@noble/hashes/pbkdf2.d.ts.map +1 -0
  336. package/node_modules/@noble/hashes/pbkdf2.js +135 -0
  337. package/node_modules/@noble/hashes/pbkdf2.js.map +1 -0
  338. package/node_modules/@noble/hashes/scrypt.d.ts +65 -0
  339. package/node_modules/@noble/hashes/scrypt.d.ts.map +1 -0
  340. package/node_modules/@noble/hashes/scrypt.js +257 -0
  341. package/node_modules/@noble/hashes/scrypt.js.map +1 -0
  342. package/node_modules/@noble/hashes/sha2.d.ts +249 -0
  343. package/node_modules/@noble/hashes/sha2.d.ts.map +1 -0
  344. package/node_modules/@noble/hashes/sha2.js +458 -0
  345. package/node_modules/@noble/hashes/sha2.js.map +1 -0
  346. package/node_modules/@noble/hashes/sha3-addons.d.ts +461 -0
  347. package/node_modules/@noble/hashes/sha3-addons.d.ts.map +1 -0
  348. package/node_modules/@noble/hashes/sha3-addons.js +783 -0
  349. package/node_modules/@noble/hashes/sha3-addons.js.map +1 -0
  350. package/node_modules/@noble/hashes/sha3.d.ts +199 -0
  351. package/node_modules/@noble/hashes/sha3.d.ts.map +1 -0
  352. package/node_modules/@noble/hashes/sha3.js +431 -0
  353. package/node_modules/@noble/hashes/sha3.js.map +1 -0
  354. package/node_modules/@noble/hashes/src/_blake.ts +57 -0
  355. package/node_modules/@noble/hashes/src/_md.ts +222 -0
  356. package/node_modules/@noble/hashes/src/_u64.ts +117 -0
  357. package/node_modules/@noble/hashes/src/argon2.ts +667 -0
  358. package/node_modules/@noble/hashes/src/blake1.ts +614 -0
  359. package/node_modules/@noble/hashes/src/blake2.ts +582 -0
  360. package/node_modules/@noble/hashes/src/blake3.ts +317 -0
  361. package/node_modules/@noble/hashes/src/eskdf.ts +259 -0
  362. package/node_modules/@noble/hashes/src/hkdf.ts +133 -0
  363. package/node_modules/@noble/hashes/src/hmac.ts +126 -0
  364. package/node_modules/@noble/hashes/src/index.ts +33 -0
  365. package/node_modules/@noble/hashes/src/legacy.ts +339 -0
  366. package/node_modules/@noble/hashes/src/pbkdf2.ts +175 -0
  367. package/node_modules/@noble/hashes/src/scrypt.ts +315 -0
  368. package/node_modules/@noble/hashes/src/sha2.ts +530 -0
  369. package/node_modules/@noble/hashes/src/sha3-addons.ts +983 -0
  370. package/node_modules/@noble/hashes/src/sha3.ts +485 -0
  371. package/node_modules/@noble/hashes/src/utils.ts +848 -0
  372. package/node_modules/@noble/hashes/src/webcrypto.ts +239 -0
  373. package/node_modules/@noble/hashes/utils.d.ts +519 -0
  374. package/node_modules/@noble/hashes/utils.d.ts.map +1 -0
  375. package/node_modules/@noble/hashes/utils.js +578 -0
  376. package/node_modules/@noble/hashes/utils.js.map +1 -0
  377. package/node_modules/@noble/hashes/webcrypto.d.ts +120 -0
  378. package/node_modules/@noble/hashes/webcrypto.d.ts.map +1 -0
  379. package/node_modules/@noble/hashes/webcrypto.js +165 -0
  380. package/node_modules/@noble/hashes/webcrypto.js.map +1 -0
  381. package/node_modules/ws/LICENSE +20 -0
  382. package/node_modules/ws/README.md +548 -0
  383. package/node_modules/ws/browser.js +8 -0
  384. package/node_modules/ws/index.js +22 -0
  385. package/node_modules/ws/lib/buffer-util.js +131 -0
  386. package/node_modules/ws/lib/constants.js +19 -0
  387. package/node_modules/ws/lib/event-target.js +292 -0
  388. package/node_modules/ws/lib/extension.js +203 -0
  389. package/node_modules/ws/lib/limiter.js +55 -0
  390. package/node_modules/ws/lib/permessage-deflate.js +530 -0
  391. package/node_modules/ws/lib/receiver.js +743 -0
  392. package/node_modules/ws/lib/sender.js +607 -0
  393. package/node_modules/ws/lib/stream.js +161 -0
  394. package/node_modules/ws/lib/subprotocol.js +62 -0
  395. package/node_modules/ws/lib/validation.js +152 -0
  396. package/node_modules/ws/lib/websocket-server.js +562 -0
  397. package/node_modules/ws/lib/websocket.js +1407 -0
  398. package/node_modules/ws/package.json +74 -0
  399. package/node_modules/ws/wrapper.mjs +21 -0
  400. package/package.json +53 -0
@@ -0,0 +1,2452 @@
1
+ // ----------------------------------------------------------------------------
2
+ // TEMPORAL
3
+ // ----------------------------------------------------------------------------
4
+
5
+ /**
6
+ * A field of date-time, such as month-of-year or hour-of-minute.
7
+ *
8
+ * Date and time is expressed using fields which partition the time-line into something meaningful
9
+ * for humans. Implementations of this interface represent those fields.
10
+ *
11
+ * The most commonly used units are defined in `ChronoField`. Further fields are supplied in
12
+ * `IsoFields`. Fields can also be written by application code by implementing this interface.
13
+ */
14
+ export abstract class TemporalField {
15
+ /** Checks if this field is supported by the temporal object. */
16
+ abstract isSupportedBy(temporal: TemporalAccessor): boolean;
17
+ /** Checks if this field represents a component of a date. */
18
+ abstract isDateBased(): boolean;
19
+ /** Checks if this field represents a component of a time. */
20
+ abstract isTimeBased(): boolean;
21
+ /** Gets the unit that the field is measured in. */
22
+ abstract baseUnit(): TemporalUnit;
23
+ /** Gets the range that the field is bound by. */
24
+ abstract rangeUnit(): TemporalUnit;
25
+ /** Gets the range of valid values for the field. */
26
+ abstract range(): ValueRange;
27
+ /**
28
+ * Get the range of valid values for this field using the temporal object to
29
+ * refine the result.
30
+ */
31
+ abstract rangeRefinedBy(temporal: TemporalAccessor): ValueRange;
32
+ /** Gets the value of this field from the specified temporal object. */
33
+ abstract getFrom(temporal: TemporalAccessor): number;
34
+ /** Returns a copy of the specified temporal object with the value of this field set. */
35
+ abstract adjustInto<R extends Temporal>(temporal: R, newValue: number): R;
36
+ abstract name(): string;
37
+ abstract displayName(/* TODO: locale */): string;
38
+ abstract equals(other: any): boolean;
39
+ }
40
+
41
+ /**
42
+ * A unit of date-time, such as Days or Hours.
43
+ *
44
+ * Measurement of time is built on units, such as years, months, days, hours, minutes and seconds.
45
+ * Implementations of this interface represent those units.
46
+ *
47
+ * An instance of this interface represents the unit itself, rather than an amount of the unit.
48
+ * See `Period` for a class that represents an amount in terms of the common units.
49
+ *
50
+ * The most commonly used units are defined in `ChronoUnit`. Further units are supplied in
51
+ * `IsoFields`. Units can also be written by application code by implementing this interface.
52
+ */
53
+ export abstract class TemporalUnit {
54
+ /** Returns a copy of the specified temporal object with the specified period added. */
55
+ abstract addTo<T extends Temporal>(temporal: T, amount: number): T;
56
+ /**
57
+ * Calculates the period in terms of this unit between two temporal objects of the same type.
58
+ *
59
+ * Returns the period between temporal1 and temporal2 in terms of this unit; a positive number
60
+ * if `temporal2` is later than `temporal1`, negative if earlier.
61
+ */
62
+ abstract between(temporal1: Temporal, temporal2: Temporal): number;
63
+ /** Gets the duration of this unit, which may be an estimate. */
64
+ abstract duration(): Duration;
65
+ /** Checks if this unit is date-based. */
66
+ abstract isDateBased(): boolean;
67
+ /** Checks if the duration of the unit is an estimate. */
68
+ abstract isDurationEstimated(): boolean;
69
+ /** Checks if this unit is supported by the specified temporal object. */
70
+ abstract isSupportedBy(temporal: Temporal): boolean;
71
+ /** Checks if this unit is time-based. */
72
+ abstract isTimeBased(): boolean;
73
+ }
74
+
75
+ /**
76
+ * The range of valid values for a date-time field.
77
+ *
78
+ * All TemporalField instances have a valid range of values. For example, the ISO day-of-month
79
+ * runs from 1 to somewhere between 28 and 31. This class captures that valid range.
80
+ *
81
+ * It is important to be aware of the limitations of this class. Only the minimum and maximum
82
+ * values are provided. It is possible for there to be invalid values within the outer range.
83
+ * For example, a weird field may have valid values of 1, 2, 4, 6, 7, thus have a range of '1 - 7',
84
+ * despite that fact that values 3 and 5 are invalid.
85
+ *
86
+ * Instances of this class are not tied to a specific field.
87
+ */
88
+ export class ValueRange {
89
+ static of(min: number, max: number): ValueRange;
90
+ static of(min: number, maxSmallest: number, maxLargest: number): ValueRange;
91
+ static of(minSmallest: number, minLargest: number, maxSmallest: number, maxLargest: number): ValueRange;
92
+
93
+ private constructor();
94
+
95
+ checkValidValue(value: number, field: TemporalField): number;
96
+ checkValidIntValue(value: number, field: TemporalField): number;
97
+ equals(other: any): boolean;
98
+ hashCode(): number;
99
+ isFixed(): boolean;
100
+ isIntValue(): boolean;
101
+ isValidIntValue(value: number): boolean;
102
+ isValidValue(value: number): boolean;
103
+ largestMinimum(): number;
104
+ maximum(): number;
105
+ minimum(): number;
106
+ smallestMaximum(): number;
107
+ toString(): string;
108
+ }
109
+
110
+ /**
111
+ * Framework-level class defining an amount of time, such as "6 hours", "8 days" or
112
+ * "2 years and 3 months".
113
+ *
114
+ * This is the base class type for amounts of time. An amount is distinct from a date or
115
+ * time-of-day in that it is not tied to any specific point on the time-line.
116
+ *
117
+ * The amount can be thought of as a `Map` of `TemporalUnit` to `number`, exposed via
118
+ * `units()` and `get()`. A simple case might have a single unit-value pair, such
119
+ * as "6 hours". A more complex case may have multiple unit-value pairs, such as "7 years,
120
+ * 3 months and 5 days".
121
+ *
122
+ * There are two common implementations. `Period` is a date-based implementation,
123
+ * storing years, months and days. `Duration` is a time-based implementation, storing
124
+ * seconds and nanoseconds, but providing some access using other duration based units such
125
+ * as minutes, hours and fixed 24-hour days.
126
+ *
127
+ * This class is a framework-level class that should not be widely used in application code.
128
+ * Instead, applications should create and pass around instances of concrete types, such as
129
+ * `Period` and `Duration`.
130
+ */
131
+ export abstract class TemporalAmount {
132
+ /**
133
+ * This adds to the specified temporal object using the logic encapsulated in the
134
+ * implementing class.
135
+ *
136
+ * There are two equivalent ways of using this method. The first is to invoke this method
137
+ * directly. The second is to use `Temporal.plus(TemporalAmount)`:
138
+ *
139
+ * ```
140
+ * // these two lines are equivalent, but the second approach is recommended
141
+ * dateTime = amount.addTo(dateTime);
142
+ * dateTime = dateTime.plus(amount);
143
+ * ```
144
+ *
145
+ * It is recommended to use the second approach, `plus(TemporalAmount)`, as it is a lot
146
+ * clearer to read in code.
147
+ */
148
+ abstract addTo<T extends Temporal>(temporal: T): T;
149
+ /** Gets the amount associated with the specified unit. */
150
+ abstract get(unit: TemporalUnit): number;
151
+ /** Gets the list of units, from largest to smallest, that fully define this amount. */
152
+ abstract units(): TemporalUnit[];
153
+ /**
154
+ * This substract to the specified temporal object using the logic encapsulated in the
155
+ * implementing class.
156
+ *
157
+ * There are two equivalent ways of using this method. The first is to invoke this method
158
+ * directly. The second is to use `Temporal.minus(TemporalAmount)`:
159
+ * ```
160
+ * // these two lines are equivalent, but the second approach is recommended
161
+ * dateTime = amount.substractFrom(dateTime);
162
+ * dateTime = dateTime.minus(amount);
163
+ * ```
164
+ *
165
+ * It is recommended to use the second approach, `minus(TemporalAmount)`, as it is a lot
166
+ * clearer to read in code.
167
+ */
168
+ abstract subtractFrom<T extends Temporal>(temporal: T): T;
169
+ }
170
+
171
+ /**
172
+ * Framework-level interface defining read-only access to a temporal object, such as a date, time,
173
+ * offset or some combination of these.
174
+ *
175
+ * This is the base interface type for date, time and offset objects. It is implemented by those
176
+ * classes that can provide information as fields or queries.
177
+ *
178
+ * Most date and time information can be represented as a number. These are modeled using
179
+ * `TemporalField` with the number held using a long to handle large values. Year, month and
180
+ * day-of-month are simple examples of fields, but they also include instant and offsets. See
181
+ * `ChronoField` for the standard set of fields.
182
+ *
183
+ * Two pieces of date/time information cannot be represented by numbers, the chronology and the
184
+ * time-zone. These can be accessed via queries using the static methods defined on
185
+ * `TemporalQueries`.
186
+ *
187
+ * A sub-interface, `Temporal`, extends this definition to one that also supports adjustment and
188
+ * manipulation on more complete temporal objects.
189
+ *
190
+ * This interface is a framework-level interface that should not be widely used in application code.
191
+ * Instead, applications should create and pass around instances of concrete types, such as
192
+ * `LocalDate`. There are many reasons for this, part of which is that implementations of this
193
+ * interface may be in calendar systems other than ISO. See `ChronoLocalDate` for a fuller
194
+ * discussion of the issues.
195
+ */
196
+ export abstract class TemporalAccessor {
197
+ /**
198
+ * Gets the value of the specified field as an integer number.
199
+ *
200
+ * This queries the date-time for the value for the specified field. The returned value will
201
+ * always be within the valid range of values for the field. If the date-time cannot return
202
+ * the value, because the field is unsupported or for some other reason, an exception will
203
+ * be thrown.
204
+ */
205
+ get(field: TemporalField): number;
206
+ /**
207
+ * Queries this date-time.
208
+ *
209
+ * This queries this date-time using the specified query strategy object.
210
+ *
211
+ * Queries are a key tool for extracting information from date-times. They exists to
212
+ * externalize the process of querying, permitting different approaches, as per the strategy
213
+ * design pattern. Examples might be a query that checks if the date is the day before
214
+ * February 29th in a leap year, or calculates the number of days to your next birthday.
215
+ *
216
+ * The most common query implementations are method references, such as `LocalDate::FROM` and
217
+ * `ZoneId::FROM`. Further implementations are on `TemporalQueries`. Queries may also be
218
+ * defined by applications.
219
+ */
220
+ query<R>(query: TemporalQuery<R>): R | null;
221
+ /**
222
+ * Gets the range of valid values for the specified field.
223
+ *
224
+ * All fields can be expressed as an integer number. This method returns an object that
225
+ * describes the valid range for that value. The value of this temporal object is used to
226
+ * enhance the accuracy of the returned range. If the date-time cannot return the range,
227
+ * because the field is unsupported or for some other reason, an exception will be thrown.
228
+ *
229
+ * Note that the result only describes the minimum and maximum valid values and it is
230
+ * important not to read too much into them. For example, there could be values within the
231
+ * range that are invalid for the field.
232
+ */
233
+ range(field: TemporalField): ValueRange;
234
+ abstract getLong(field: TemporalField): number;
235
+ /**
236
+ * Checks if the specified field is supported.
237
+ *
238
+ * This checks if the date-time can be queried for the specified field. If false, then
239
+ * calling the `range` and `get` methods will throw an exception.
240
+ */
241
+ abstract isSupported(field: TemporalField): boolean;
242
+ }
243
+
244
+ /**
245
+ * Framework-level interface defining read-write access to a temporal object, such as a date, time,
246
+ * offset or some combination of these.
247
+ *
248
+ * This is the base interface type for date, time and offset objects that are complete enough to be
249
+ * manipulated using plus and minus. It is implemented by those classes that can provide and
250
+ * manipulate information as fields or queries. See `TemporalAccessor` for the read-only version of
251
+ * this interface.
252
+ *
253
+ * Most date and time information can be represented as a number. These are modeled using
254
+ * `TemporalField` with the number held using a long to handle large values. Year, month and
255
+ * day-of-month are simple examples of fields, but they also include instant and offsets. See
256
+ * `ChronoField` for the standard set of fields.
257
+ *
258
+ * Two pieces of date/time information cannot be represented by numbers, the chronology and the
259
+ * time-zone. These can be accessed via queries using the static methods defined on
260
+ * `TemporalQueries`.
261
+ *
262
+ * This interface is a framework-level interface that should not be widely used in application code.
263
+ * Instead, applications should create and pass around instances of concrete types, such as
264
+ * `LocalDate`. There are many reasons for this, part of which is that implementations of this
265
+ * interface may be in calendar systems other than ISO. See `ChronoLocalDate` for a fuller
266
+ * discussion of the issues.
267
+ */
268
+ export abstract class Temporal extends TemporalAccessor {
269
+ abstract isSupported(field: TemporalField): boolean;
270
+ /**
271
+ * Checks if the specified unit is supported.
272
+ *
273
+ * This checks if the date-time can be queried for the specified unit. If false, then calling
274
+ * the plus and minus methods will throw an exception.
275
+ */
276
+ abstract isSupported(unit: TemporalUnit): boolean;
277
+ abstract minus(amountToSubtract: number, unit: TemporalUnit): Temporal;
278
+ /**
279
+ * Returns an object of the same type as this object with an amount subtracted.
280
+ *
281
+ * This adjusts this temporal, subtracting according to the rules of the specified amount.
282
+ * The amount is typically a `Period` but may be any other type implementing `TemporalAmount`,
283
+ * such as `Duration`.
284
+ *
285
+ * Some example code indicating how and why this method is used:
286
+ * ```
287
+ * date = date.minus(period); // subtract a Period instance
288
+ * date = date.minus(duration); // subtract a Duration instance
289
+ * date = date.minus(workingDays(6)); // example user-written workingDays method
290
+ * ```
291
+ *
292
+ * Note that calling plus followed by minus is not guaranteed to return the same date-time.
293
+ */
294
+ abstract minus(amount: TemporalAmount): Temporal;
295
+ abstract plus(amountToAdd: number, unit: TemporalUnit): Temporal;
296
+ /**
297
+ * Returns an object of the same type as this object with an amount added.
298
+ *
299
+ * This adjusts this temporal, adding according to the rules of the specified amount. The
300
+ * amount is typically a `Period` but may be any other type implementing `TemporalAmount`,
301
+ * such as `Duration`.
302
+ *
303
+ * Some example code indicating how and why this method is used:
304
+ * ```
305
+ * date = date.plus(period); // add a Period instance
306
+ * date = date.plus(duration); // add a Duration instance
307
+ * date = date.plus(workingDays(6)); // example user-written workingDays method
308
+ * ```
309
+ *
310
+ * Note that calling plus followed by minus is not guaranteed to return the same date-time.
311
+ */
312
+ abstract plus(amount: TemporalAmount): Temporal;
313
+ /**
314
+ * Calculates the period between this temporal and another temporal in terms of the
315
+ * specified unit.
316
+ *
317
+ * This calculates the period between two temporals in terms of a single unit. The start
318
+ * and end points are this and the specified temporal. The result will be negative if the
319
+ * end is before the start. For example, the period in hours between two temporal objects
320
+ * can be calculated using `startTime.until(endTime, HOURS)`.
321
+ *
322
+ * The calculation returns a whole number, representing the number of complete units between
323
+ * the two temporals. For example, the period in hours between the times 11:30 and 13:29 will
324
+ * only be one hour as it is one minute short of two hours.
325
+ *
326
+ * There are two equivalent ways of using this method. The first is to invoke this method
327
+ * directly. The second is to use `TemporalUnit.between(Temporal, Temporal)`:
328
+ * ```
329
+ * // these two lines are equivalent
330
+ * between = thisUnit.between(start, end);
331
+ * between = start.until(end, thisUnit);
332
+ * ```
333
+ *
334
+ * The choice should be made based on which makes the code more readable.
335
+ *
336
+ * For example, this method allows the number of days between two dates to be calculated:
337
+ * ```
338
+ * const daysBetween = DAYS.between(start, end);
339
+ * // or alternatively
340
+ * const daysBetween = start.until(end, DAYS);
341
+ * ```
342
+ */
343
+ abstract until(endTemporal: Temporal, unit: TemporalUnit): number;
344
+ /**
345
+ * Returns an adjusted object of the same type as this object with the adjustment made.
346
+ *
347
+ * This adjusts this date-time according to the rules of the specified adjuster. A simple
348
+ * adjuster might simply set the one of the fields, such as the year field. A more complex
349
+ * adjuster might set the date to the last day of the month. A selection of common adjustments
350
+ * is provided in `TemporalAdjusters`. These include finding the "last day of the month" and
351
+ * "next Wednesday". The adjuster is responsible for handling special cases, such as the
352
+ * varying lengths of month and leap years.
353
+ *
354
+ * Some example code indicating how and why this method is used:
355
+ * ```
356
+ * date = date.with(Month.JULY); // most key classes implement TemporalAdjuster
357
+ * date = date.with(lastDayOfMonth()); // static import from TemporalAdjusters
358
+ * date = date.with(next(WEDNESDAY)); // static import from TemporalAdjusters and DayOfWeek
359
+ * ```
360
+ */
361
+ abstract with(adjuster: TemporalAdjuster): Temporal;
362
+ /**
363
+ * Returns an object of the same type as this object with the specified field altered.
364
+ *
365
+ * This returns a new object based on this one with the value for the specified field changed.
366
+ * For example, on a `LocalDate`, this could be used to set the year, month or day-of-month.
367
+ * The returned object will have the same observable type as this object.
368
+ *
369
+ * In some cases, changing a field is not fully defined. For example, if the target object is
370
+ * a date representing the 31st January, then changing the month to February would be unclear.
371
+ * In cases like this, the field is responsible for resolving the result. Typically it will
372
+ * choose the previous valid date, which would be the last valid day of February in this
373
+ * example.
374
+ */
375
+ abstract with(field: TemporalField, newValue: number): Temporal;
376
+ }
377
+
378
+ /**
379
+ * Strategy for adjusting a temporal object.
380
+ *
381
+ * Adjusters are a key tool for modifying temporal objects. They exist to externalize the process
382
+ * of adjustment, permitting different approaches, as per the strategy design pattern. Examples
383
+ * might be an adjuster that sets the date avoiding weekends, or one that sets the date to the
384
+ * last day of the month.
385
+ *
386
+ * There are two equivalent ways of using a `TemporalAdjuster`. The first is to invoke the method
387
+ * on this interface directly. The second is to use `Temporal.with(TemporalAdjuster)`:
388
+ *
389
+ * ```
390
+ * // these two lines are equivalent, but the second approach is recommended
391
+ * temporal = thisAdjuster.adjustInto(temporal);
392
+ * temporal = temporal.with(thisAdjuster);
393
+ * ```
394
+ *
395
+ * It is recommended to use the second approach, `with(TemporalAdjuster)`, as it is a lot clearer
396
+ * to read in code.
397
+ *
398
+ * See `TemporalAdjusters` for a standard set of adjusters, including finding the last day of
399
+ * the month. Adjusters may also be defined by applications.
400
+ */
401
+ export abstract class TemporalAdjuster {
402
+ abstract adjustInto(temporal: Temporal): Temporal;
403
+ }
404
+
405
+ export abstract class TemporalQuery<R> {
406
+ abstract queryFrom(temporal: TemporalAccessor): R;
407
+ }
408
+
409
+ /**
410
+ A standard set of fields.
411
+ *
412
+ * This set of fields provide field-based access to manipulate a date, time or date-time.
413
+ * The standard set of fields can be extended by implementing {@link TemporalField}.
414
+ */
415
+ export class ChronoField extends TemporalField {
416
+ /**
417
+ * This represents concept of the count of
418
+ * days within the period of a week where the weeks are aligned to the start of the month.
419
+ * This field is typically used with `ALIGNED_WEEK_OF_MONTH`.
420
+ */
421
+ static ALIGNED_DAY_OF_WEEK_IN_MONTH: ChronoField;
422
+ /**
423
+ * This represents concept of the count of days
424
+ * within the period of a week where the weeks are aligned to the start of the year.
425
+ * This field is typically used with `ALIGNED_WEEK_OF_YEAR`.
426
+ */
427
+ static ALIGNED_DAY_OF_WEEK_IN_YEAR: ChronoField;
428
+ /**
429
+ * This represents concept of the count of weeks within
430
+ * the period of a month where the weeks are aligned to the start of the month. This field
431
+ * is typically used with `ALIGNED_DAY_OF_WEEK_IN_MONTH`.
432
+ */
433
+ static ALIGNED_WEEK_OF_MONTH: ChronoField;
434
+ /**
435
+ * his represents concept of the count of weeks within
436
+ * the period of a year where the weeks are aligned to the start of the year. This field
437
+ * is typically used with `ALIGNED_DAY_OF_WEEK_IN_YEAR`.
438
+ */
439
+ static ALIGNED_WEEK_OF_YEAR: ChronoField;
440
+ /**
441
+ * This counts the AM/PM within the day, from 0 (AM) to 1 (PM).
442
+ */
443
+ static AMPM_OF_DAY: ChronoField;
444
+ /**
445
+ * This counts the hour within the AM/PM, from 1 to 12.
446
+ * This is the hour that would be observed on a standard 12-hour analog wall clock.
447
+ */
448
+ static CLOCK_HOUR_OF_AMPM: ChronoField;
449
+ /**
450
+ * This counts the hour within the AM/PM, from 1 to 24.
451
+ * This is the hour that would be observed on a 24-hour analog wall clock.
452
+ */
453
+ static CLOCK_HOUR_OF_DAY: ChronoField;
454
+ /**
455
+ * This represents the concept of the day within the month.
456
+ * In the default ISO calendar system, this has values from 1 to 31 in most months.
457
+ * April, June, September, November have days from 1 to 30, while February has days from
458
+ * 1 to 28, or 29 in a leap year.
459
+ */
460
+ static DAY_OF_MONTH: ChronoField;
461
+ /**
462
+ * This represents the standard concept of the day of the week.
463
+ * In the default ISO calendar system, this has values from Monday (1) to Sunday (7).
464
+ * The {@link DayOfWeek} class can be used to interpret the result.
465
+ */
466
+ static DAY_OF_WEEK: ChronoField;
467
+ /**
468
+ * This represents the concept of the day within the year.
469
+ * In the default ISO calendar system, this has values from 1 to 365 in standard years and
470
+ * 1 to 366 in leap years.
471
+ */
472
+ static DAY_OF_YEAR: ChronoField;
473
+ /**
474
+ * This field is the sequential count of days where
475
+ * 1970-01-01 (ISO) is zero. Note that this uses the local time-line, ignoring offset and
476
+ * time-zone.
477
+ */
478
+ static EPOCH_DAY: ChronoField;
479
+ /**
480
+ * This represents the concept of the era, which is the largest
481
+ * division of the time-line. This field is typically used with `YEAR_OF_ERA`.
482
+ *
483
+ * In the default ISO calendar system, there are two eras defined, 'BCE' and 'CE'. The era
484
+ * 'CE' is the one currently in use and year-of-era runs from 1 to the maximum value.
485
+ * The era 'BCE' is the previous era, and the year-of-era runs backwards.
486
+ */
487
+ static ERA: ChronoField;
488
+ /**
489
+ * This counts the hour within the AM/PM, from 0 to 11.
490
+ * This is the hour that would be observed on a standard 12-hour digital clock.
491
+ */
492
+ static HOUR_OF_AMPM: ChronoField;
493
+ /**
494
+ * This counts the hour within the day, from 0 to 23. This is
495
+ * the hour that would be observed on a standard 24-hour digital clock.
496
+ */
497
+ static HOUR_OF_DAY: ChronoField;
498
+ /**
499
+ * This represents the concept of the sequential count of
500
+ * seconds where `1970-01-01T00:00Z` (ISO) is zero. This field may be used with `NANO_OF_DAY`
501
+ * to represent the fraction of the day.
502
+ *
503
+ * An Instant represents an instantaneous point on the time-line. On their own they have
504
+ * no elements which allow a local date-time to be obtained. Only when paired with an offset
505
+ * or time-zone can the local date or time be found. This field allows the seconds part of
506
+ * the instant to be queried.
507
+ */
508
+ static INSTANT_SECONDS: ChronoField;
509
+ /**
510
+ * This counts the microsecond within the day, from `0` to
511
+ * `(24 * 60 * 60 * 1_000_000) - 1`.
512
+ *
513
+ * This field is used to represent the micro-of-day handling any fraction of the second.
514
+ * Implementations of {@link TemporalAccessor} should provide a value for this field if they
515
+ * can return a value for `SECOND_OF_DAY` filling unknown precision with zero.
516
+ *
517
+ * When this field is used for setting a value, it should behave in the same way as
518
+ * setting `NANO_OF_DAY` with the value multiplied by 1,000.
519
+ */
520
+ static MICRO_OF_DAY: ChronoField;
521
+ /**
522
+ * This counts the microsecond within the second, from 0 to 999,999.
523
+ *
524
+ * This field is used to represent the micro-of-second handling any fraction of the second.
525
+ * Implementations of {@link TemporalAccessor} should provide a value for this field if they
526
+ * can return a value for `SECOND_OF_MINUTE`, `SECOND_OF_DAY` or `INSTANT_SECONDS` filling
527
+ * unknown precision with zero.
528
+ */
529
+ static MICRO_OF_SECOND: ChronoField;
530
+ /**
531
+ * This counts the millisecond within the day, from 0 to
532
+ * `(24 * 60 * 60 * 1,000) - 1`.
533
+ *
534
+ * This field is used to represent the milli-of-day handling any fraction of the second.
535
+ * Implementations of {@link TemporalAccessor} should provide a value for this field if they
536
+ * can return a value for `SECOND_OF_DAY` filling unknown precision with zero.
537
+ *
538
+ * When this field is used for setting a value, it should behave in the same way as
539
+ * setting `NANO_OF_DAY` with the value multiplied by 1,000,000.
540
+ */
541
+ static MILLI_OF_DAY: ChronoField;
542
+ /**
543
+ * This counts the millisecond within the second, from 0 to
544
+ * 999.
545
+ *
546
+ * This field is used to represent the milli-of-second handling any fraction of the second.
547
+ * Implementations of {@link TemporalAccessor} should provide a value for this field if they can
548
+ * return a value for `SECOND_OF_MINUTE`, `SECOND_OF_DAY` or `INSTANT_SECONDS` filling unknown
549
+ * precision with zero.
550
+ *
551
+ * When this field is used for setting a value, it should behave in the same way as
552
+ * setting `NANO_OF_SECOND` with the value multiplied by 1,000,000.
553
+ */
554
+ static MILLI_OF_SECOND: ChronoField;
555
+ /**
556
+ * This counts the minute within the day, from 0 to `(24 * 60) - 1`.
557
+ */
558
+ static MINUTE_OF_DAY: ChronoField;
559
+ /**
560
+ * This counts the minute within the hour, from 0 to 59.
561
+ */
562
+ static MINUTE_OF_HOUR: ChronoField;
563
+ /**
564
+ * The month-of-year, such as March. This represents the concept
565
+ * of the month within the year. In the default ISO calendar system, this has values from
566
+ * January (1) to December (12).
567
+ */
568
+ static MONTH_OF_YEAR: ChronoField;
569
+ /**
570
+ * This counts the nanosecond within the day, from 0 to
571
+ * `(24 * 60 * 60 * 1,000,000,000) - 1`.
572
+ *
573
+ * This field is used to represent the nano-of-day handling any fraction of the second.
574
+ * Implementations of {@link TemporalAccessor} should provide a value for this field if they
575
+ * can return a value for `SECOND_OF_DAY` filling unknown precision with zero.
576
+ */
577
+ static NANO_OF_DAY: ChronoField;
578
+ /**
579
+ * This counts the nanosecond within the second, from 0
580
+ * to 999,999,999.
581
+ *
582
+ * This field is used to represent the nano-of-second handling any fraction of the second.
583
+ * Implementations of {@link TemporalAccessor} should provide a value for this field if they
584
+ * can return a value for `SECOND_OF_MINUTE`, `SECOND_OF_DAY` or `INSTANT_SECONDS` filling
585
+ * unknown precision with zero.
586
+ *
587
+ * When this field is used for setting a value, it should set as much precision as the
588
+ * object stores, using integer division to remove excess precision. For example, if the
589
+ * {@link TemporalAccessor} stores time to millisecond precision, then the nano-of-second must
590
+ * be divided by 1,000,000 before replacing the milli-of-second.
591
+ */
592
+ static NANO_OF_SECOND: ChronoField;
593
+ /**
594
+ * This represents the concept of the offset in seconds of
595
+ * local time from UTC/Greenwich.
596
+ *
597
+ * A {@link ZoneOffset} represents the period of time that local time differs from
598
+ * UTC/Greenwich. This is usually a fixed number of hours and minutes. It is equivalent to
599
+ * the total amount of the offset in seconds. For example, during the winter Paris has an
600
+ * offset of +01:00, which is 3600 seconds.
601
+ */
602
+ static OFFSET_SECONDS: ChronoField;
603
+ /**
604
+ * The proleptic-month, which counts months sequentially
605
+ * from year 0.
606
+ *
607
+ * The first month in year zero has the value zero. The value increase for later months
608
+ * and decrease for earlier ones. Note that this uses the local time-line, ignoring offset
609
+ * and time-zone.
610
+ */
611
+ static PROLEPTIC_MONTH: ChronoField;
612
+ /**
613
+ * This counts the second within the day, from 0 to
614
+ * (24 * 60 * 60) - 1.
615
+ */
616
+ static SECOND_OF_DAY: ChronoField;
617
+ /**
618
+ * This counts the second within the minute, from 0 to 59.
619
+ */
620
+ static SECOND_OF_MINUTE: ChronoField;
621
+ /**
622
+ * The proleptic year, such as 2012. This represents the concept of
623
+ * the year, counting sequentially and using negative numbers. The proleptic year is not
624
+ * interpreted in terms of the era.
625
+ *
626
+ * The standard mental model for a date is based on three concepts - year, month and day.
627
+ * These map onto the `YEAR`, `MONTH_OF_YEAR` and `DAY_OF_MONTH` fields. Note that there is no
628
+ * reference to eras. The full model for a date requires four concepts - era, year, month and
629
+ * day. These map onto the `ERA`, `YEAR_OF_ERA`, `MONTH_OF_YEAR` and `DAY_OF_MONTH` fields.
630
+ * Whether this field or `YEAR_OF_ERA` is used depends on which mental model is being used.
631
+ */
632
+ static YEAR: ChronoField;
633
+ /**
634
+ * This represents the concept of the year within the era. This
635
+ * field is typically used with `ERA`. The standard mental model for a date is based on three
636
+ * concepts - year, month and day. These map onto the `YEAR`, `MONTH_OF_YEAR` and
637
+ * `DAY_OF_MONTH` fields. Note that there is no reference to eras. The full model for a date
638
+ * requires four concepts - era, year, month and day. These map onto the `ERA`, `YEAR_OF_ERA`,
639
+ * `MONTH_OF_YEAR` and `DAY_OF_MONTH` fields. Whether this field or `YEAR` is used depends on
640
+ * which mental model is being used.
641
+ *
642
+ * In the default ISO calendar system, there are two eras defined, 'BCE' and 'CE'.
643
+ * The era 'CE' is the one currently in use and year-of-era runs from 1 to the maximum value.
644
+ * The era 'BCE' is the previous era, and the year-of-era runs backwards.
645
+ *
646
+ * For example, subtracting a year each time yield the following:
647
+ * - year-proleptic 2 = 'CE' year-of-era 2
648
+ * - year-proleptic 1 = 'CE' year-of-era 1
649
+ * - year-proleptic 0 = 'BCE' year-of-era 1
650
+ * - year-proleptic -1 = 'BCE' year-of-era 2
651
+ *
652
+ * Note that the ISO-8601 standard does not actually define eras. Note also that the
653
+ * ISO eras do not align with the well-known AD/BC eras due to the change between the Julian
654
+ * and Gregorian calendar systems.
655
+ */
656
+ static YEAR_OF_ERA: ChronoField;
657
+
658
+ private constructor();
659
+
660
+ isSupportedBy(temporal: TemporalAccessor): boolean;
661
+ baseUnit(): TemporalUnit;
662
+ /** Checks that the specified value is valid for this field. */
663
+ checkValidValue(value: number): number;
664
+ /**
665
+ * Checks that the specified value is valid for this field and
666
+ * is within the range of a safe integer.
667
+ */
668
+ checkValidIntValue(value: number): number;
669
+ displayName(): string;
670
+ equals(other: any): boolean;
671
+ getFrom(temporal: TemporalAccessor): number;
672
+ isDateBased(): boolean;
673
+ isTimeBased(): boolean;
674
+ name(): string;
675
+ range(): ValueRange;
676
+ rangeRefinedBy(temporal: TemporalAccessor): ValueRange;
677
+ rangeUnit(): TemporalUnit;
678
+ adjustInto<R extends Temporal>(temporal: R, newValue: number): R;
679
+ toString(): string;
680
+ }
681
+
682
+ /**
683
+ * A standard set of date periods units.
684
+ *
685
+ * This set of units provide unit-based access to manipulate a date, time or date-time.
686
+ * The standard set of units can be extended by implementing TemporalUnit.
687
+ */
688
+ export class ChronoUnit extends TemporalUnit {
689
+ /**
690
+ * Unit that represents the concept of a nanosecond, the smallest supported unit
691
+ * of time. For the ISO calendar system, it is equal to the 1,000,000,000th part of the second unit.
692
+ */
693
+ static NANOS: ChronoUnit;
694
+ /**
695
+ * Unit that represents the concept of a microsecond. For the ISO calendar
696
+ * system, it is equal to the 1,000,000th part of the second unit.
697
+ */
698
+ static MICROS: ChronoUnit;
699
+ /**
700
+ * Unit that represents the concept of a millisecond. For the ISO calendar
701
+ * system, it is equal to the 1000th part of the second unit.
702
+ */
703
+ static MILLIS: ChronoUnit;
704
+ /**
705
+ * Unit that represents the concept of a second. For the ISO calendar system,
706
+ * it is equal to the second in the SI system of units, except around a leap-second.
707
+ */
708
+ static SECONDS: ChronoUnit;
709
+ /**
710
+ * Unit that represents the concept of a minute. For the ISO calendar system,
711
+ * it is equal to 60 seconds.
712
+ */
713
+ static MINUTES: ChronoUnit;
714
+ /**
715
+ * Unit that represents the concept of an hour. For the ISO calendar system,
716
+ * it is equal to 60 minutes.
717
+ */
718
+ static HOURS: ChronoUnit;
719
+ /**
720
+ * Unit that represents the concept of half a day, as used in AM/PM. For
721
+ * the ISO calendar system, it is equal to 12 hours.
722
+ */
723
+ static HALF_DAYS: ChronoUnit;
724
+ /**
725
+ * Unit that represents the concept of a day. For the ISO calendar system, it
726
+ * is the standard day from midnight to midnight. The estimated duration of a day is 24 Hours.
727
+ */
728
+ static DAYS: ChronoUnit;
729
+ /**
730
+ * Unit that represents the concept of a week. For the ISO calendar system,
731
+ * it is equal to 7 Days.
732
+ */
733
+ static WEEKS: ChronoUnit;
734
+ /**
735
+ * Unit that represents the concept of a month. For the ISO calendar system,
736
+ * the length of the month varies by month-of-year. The estimated duration of a month is
737
+ * one twelfth of 365.2425 Days.
738
+ */
739
+ static MONTHS: ChronoUnit;
740
+ /**
741
+ * Unit that represents the concept of a year. For the ISO calendar system, it
742
+ * is equal to 12 months. The estimated duration of a year is 365.2425 Days.
743
+ */
744
+ static YEARS: ChronoUnit;
745
+ /**
746
+ * Unit that represents the concept of a decade. For the ISO calendar system,
747
+ * it is equal to 10 years.
748
+ */
749
+ static DECADES: ChronoUnit;
750
+ /**
751
+ * Unit that represents the concept of a century. For the ISO calendar
752
+ * system, it is equal to 100 years.
753
+ */
754
+ static CENTURIES: ChronoUnit;
755
+ /**
756
+ * Unit that represents the concept of a millennium. For the ISO calendar
757
+ * system, it is equal to 1,000 years.
758
+ */
759
+ static MILLENNIA: ChronoUnit;
760
+ /**
761
+ * Unit that represents the concept of an era. The ISO calendar system doesn't
762
+ * have eras thus it is impossible to add an era to a date or date-time. The estimated duration
763
+ * of the era is artificially defined as 1,000,000,000 Years.
764
+ */
765
+ static ERAS: ChronoUnit;
766
+ /**
767
+ * Artificial unit that represents the concept of forever. This is primarily
768
+ * used with {@link TemporalField} to represent unbounded fields such as the year or era. The
769
+ * estimated duration of the era is artificially defined as the largest duration supported by
770
+ * {@link Duration}.
771
+ */
772
+ static FOREVER: ChronoUnit;
773
+
774
+ private constructor();
775
+
776
+ addTo<T extends Temporal>(temporal: T, amount: number): T;
777
+ between(temporal1: Temporal, temporal2: Temporal): number;
778
+ /**
779
+ * Compares this ChronoUnit to the specified {@link TemporalUnit}.
780
+ * The comparison is based on the total length of the durations.
781
+ */
782
+ compareTo(other: TemporalUnit): number;
783
+ duration(): Duration;
784
+ isDateBased(): boolean;
785
+ isDurationEstimated(): boolean;
786
+ isSupportedBy(temporal: Temporal): boolean;
787
+ isTimeBased(): boolean;
788
+ toString(): string;
789
+ }
790
+
791
+ /**
792
+ * Fields and units specific to the ISO-8601 calendar system,
793
+ * including quarter-of-year and week-based-year.
794
+ */
795
+ export namespace IsoFields {
796
+ /**
797
+ * This field allows the day-of-quarter value to be queried and set. The day-of-quarter has
798
+ * values from 1 to 90 in Q1 of a standard year, from 1 to 91 in Q1 of a leap year, from
799
+ * 1 to 91 in Q2 and from 1 to 92 in Q3 and Q4.
800
+ *
801
+ * The day-of-quarter can only be calculated if the day-of-year, month-of-year and year are available.
802
+ *
803
+ * When setting this field, the value is allowed to be partially lenient, taking any value from
804
+ * 1 to 92. If the quarter has less than 92 days, then day 92, and potentially day 91, is in
805
+ * the following quarter.
806
+ */
807
+ export const DAY_OF_QUARTER: TemporalField;
808
+ /**
809
+ * This field allows the quarter-of-year value to be queried and set. The quarter-of-year has
810
+ * values from 1 to 4.
811
+ *
812
+ * The day-of-quarter can only be calculated if the month-of-year is available.
813
+ */
814
+ export const QUARTER_OF_YEAR: TemporalField;
815
+ /**
816
+ * The field that represents the week-of-week-based-year.
817
+ */
818
+ export const WEEK_OF_WEEK_BASED_YEAR: TemporalField;
819
+ /**
820
+ * The field that represents the week-based-year.
821
+ */
822
+ export const WEEK_BASED_YEAR: TemporalField;
823
+ /**
824
+ * The unit that represents week-based-years for the purpose of addition and subtraction.
825
+ *
826
+ * This allows a number of week-based-years to be added to, or subtracted from, a date.
827
+ * The unit is equal to either 52 or 53 weeks. The estimated duration of a week-based-year is
828
+ * the same as that of a standard ISO year at 365.2425 Days.
829
+ *
830
+ * The rules for addition add the number of week-based-years to the existing value for the
831
+ * week-based-year field. If the resulting week-based-year only has 52 weeks, then the date
832
+ * will be in week 1 of the following week-based-year.
833
+ */
834
+ export const WEEK_BASED_YEARS: TemporalUnit;
835
+ /**
836
+ * Unit that represents the concept of a quarter-year. For the ISO calendar system, it is equal
837
+ * to 3 months. The estimated duration of a quarter-year is one quarter of 365.2425 days.
838
+ */
839
+ export const QUARTER_YEARS: TemporalUnit;
840
+ }
841
+
842
+ export namespace TemporalAdjusters {
843
+ /**
844
+ * Returns the day-of-week in month adjuster, which returns a new date in the same month with
845
+ * the ordinal day-of-week. This is used for expressions like the 'second Tuesday in March'.
846
+ *
847
+ * The ISO calendar system behaves as follows:
848
+ * - The input 2011-12-15 for (1,TUESDAY) will return 2011-12-06.
849
+ * - The input 2011-12-15 for (2,TUESDAY) will return 2011-12-13.
850
+ * - The input 2011-12-15 for (3,TUESDAY) will return 2011-12-20.
851
+ * - The input 2011-12-15 for (4,TUESDAY) will return 2011-12-27.
852
+ * - The input 2011-12-15 for (5,TUESDAY) will return 2012-01-03.
853
+ * - The input 2011-12-15 for (-1,TUESDAY) will return 2011-12-27 (last in month).
854
+ * - The input 2011-12-15 for (-4,TUESDAY) will return 2011-12-06 (3 weeks before last in month).
855
+ * - The input 2011-12-15 for (-5,TUESDAY) will return 2011-11-29 (4 weeks before last in month).
856
+ * - The input 2011-12-15 for (0,TUESDAY) will return 2011-11-29 (last in previous month).
857
+ *
858
+ * For a positive or zero ordinal, the algorithm is equivalent to finding the first day-of-week
859
+ * that matches within the month and then adding a number of weeks to it. For a negative
860
+ * ordinal, the algorithm is equivalent to finding the last day-of-week that matches within the
861
+ * month and then subtracting a number of weeks to it. The ordinal number of weeks is not
862
+ * validated and is interpreted leniently according to this algorithm. This definition means
863
+ * that an ordinal of zero finds the last matching day-of-week in the previous month.
864
+ *
865
+ * The behavior is suitable for use with most calendar systems. It uses the `DAY_OF_WEEK`
866
+ * and `DAY_OF_MONTH` fields and the `DAYS` unit, and assumes a seven day week.
867
+ */
868
+ function dayOfWeekInMonth(ordinal: number, dayOfWeek: DayOfWeek): TemporalAdjuster;
869
+ /**
870
+ * Returns the "first day of month" adjuster, which returns a new date set to the first day
871
+ * of the current month.
872
+ *
873
+ * The ISO calendar system behaves as follows:
874
+ * - The input 2011-01-15 will return 2011-01-01.
875
+ * - The input 2011-02-15 will return 2011-02-01.
876
+ *
877
+ * The behavior is suitable for use with most calendar systems. It is equivalent to:
878
+ * ```
879
+ * temporal.with(DAY_OF_MONTH, 1);
880
+ * ```
881
+ */
882
+ function firstDayOfMonth(): TemporalAdjuster;
883
+ /**
884
+ * Returns the "first day of next month" adjuster, which returns a new date set to the first
885
+ * day of the next month.
886
+ *
887
+ * The ISO calendar system behaves as follows:
888
+ * - The input 2011-01-15 will return 2011-02-01.
889
+ * - The input 2011-02-15 will return 2011-03-01.
890
+ *
891
+ * The behavior is suitable for use with most calendar systems. It is equivalent to:
892
+ * ```
893
+ * temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS);
894
+ * ```
895
+ */
896
+ function firstDayOfNextMonth(): TemporalAdjuster;
897
+ /**
898
+ * Returns the "first day of next year" adjuster, which returns a new date set to the first
899
+ * day of the next year.
900
+ *
901
+ * The ISO calendar system behaves as follows:
902
+ * - The input 2011-01-15 will return 2012-01-01.
903
+ *
904
+ * The behavior is suitable for use with most calendar systems. It is equivalent to:
905
+ * ```
906
+ * temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS);
907
+ * ```
908
+ */
909
+ function firstDayOfNextYear(): TemporalAdjuster;
910
+ /**
911
+ * Returns the "first day of year" adjuster, which returns a new date set to the first day
912
+ * of the current year.
913
+ *
914
+ * The ISO calendar system behaves as follows:
915
+ * - The input 2011-01-15 will return 2011-01-01.
916
+ * - The input 2011-02-15 will return 2011-01-01.
917
+ *
918
+ * The behavior is suitable for use with most calendar systems. It is equivalent to:
919
+ * ```
920
+ * temporal.with(DAY_OF_YEAR, 1);
921
+ * ```
922
+ */
923
+ function firstDayOfYear(): TemporalAdjuster;
924
+ /**
925
+ * Returns the first in month adjuster, which returns a new date in the same month with the
926
+ * first matching day-of-week. This is used for expressions like 'first Tuesday in March'.
927
+ *
928
+ * The ISO calendar system behaves as follows:
929
+ * - The input 2011-12-15 for (MONDAY) will return 2011-12-05.
930
+ * - The input 2011-12-15 for (FRIDAY) will return 2011-12-02.
931
+ *
932
+ * The behavior is suitable for use with most calendar systems. It uses the `DAY_OF_WEEK`
933
+ * and `DAY_OF_MONTH` fields and the `DAYS` unit, and assumes a seven day week.
934
+ */
935
+ function firstInMonth(dayOfWeek: DayOfWeek): TemporalAdjuster;
936
+ /**
937
+ * Returns the "last day of month" adjuster, which returns a new date set to the last day of
938
+ * the current month.
939
+ *
940
+ * The ISO calendar system behaves as follows:
941
+ * - The input 2011-01-15 will return 2011-01-31.
942
+ * - The input 2011-02-15 will return 2011-02-28.
943
+ * - The input 2012-02-15 will return 2012-02-29 (leap year).
944
+ * - The input 2011-04-15 will return 2011-04-30.
945
+ *
946
+ * The behavior is suitable for use with most calendar systems. It is equivalent to:
947
+ * ```
948
+ * const lastDay = temporal.range(DAY_OF_MONTH).getMaximum();
949
+ * temporal.with(DAY_OF_MONTH, lastDay);
950
+ * ```
951
+ */
952
+ function lastDayOfMonth(): TemporalAdjuster;
953
+ /**
954
+ * Returns the "last day of year" adjuster, which returns a new date set to the last day of
955
+ * the current year.
956
+ *
957
+ * The ISO calendar system behaves as follows:
958
+ * - The input 2011-01-15 will return 2011-12-31.
959
+ * - The input 2011-02-15 will return 2011-12-31.
960
+ *
961
+ * The behavior is suitable for use with most calendar systems. It is equivalent to:
962
+ * ```
963
+ * const lastDay = temporal.range(DAY_OF_YEAR).getMaximum();
964
+ * temporal.with(DAY_OF_YEAR, lastDay);
965
+ * ```
966
+ */
967
+ function lastDayOfYear(): TemporalAdjuster;
968
+ /**
969
+ * Returns the last in month adjuster, which returns a new date in the same month with the
970
+ * last matching day-of-week. This is used for expressions like 'last Tuesday in March'.
971
+ *
972
+ * The ISO calendar system behaves as follows:
973
+ * - The input 2011-12-15 for (MONDAY) will return 2011-12-26.
974
+ * - The input 2011-12-15 for (FRIDAY) will return 2011-12-30.
975
+ *
976
+ * The behavior is suitable for use with most calendar systems. It uses the `DAY_OF_WEEK`
977
+ * and `DAY_OF_MONTH` fields and the `DAYS` unit, and assumes a seven day week.
978
+ */
979
+ function lastInMonth(dayOfWeek: DayOfWeek): TemporalAdjuster;
980
+ /**
981
+ * Returns the next day-of-week adjuster, which adjusts the date to the first occurrence of
982
+ * the specified day-of-week after the date being adjusted.
983
+ *
984
+ * - The ISO calendar system behaves as follows:
985
+ * - The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-17 (two
986
+ * days later).
987
+ * - The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-19 (four
988
+ * days later).
989
+ * - The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-22 (seven
990
+ * days later).
991
+ *
992
+ * The behavior is suitable for use with most calendar systems. It uses the `DAY_OF_WEEK`
993
+ * field and the `DAYS` unit, and assumes a seven day week.
994
+ */
995
+ function next(dayOfWeek: DayOfWeek): TemporalAdjuster;
996
+ /**
997
+ * Returns the next-or-same day-of-week adjuster, which adjusts the date to the first
998
+ * occurrence of the specified day-of-week after the date being adjusted unless it is already
999
+ * on that day in which case the same object is returned.
1000
+ *
1001
+ * The ISO calendar system behaves as follows:
1002
+ * - The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-17 (two
1003
+ * days later).
1004
+ * - The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-19 (four
1005
+ * days later).
1006
+ * - The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-15 (same
1007
+ * as input).
1008
+ *
1009
+ * The behavior is suitable for use with most calendar systems. It uses the `DAY_OF_WEEK`
1010
+ * field and the `DAYS` unit, and assumes a seven day week.
1011
+ */
1012
+ function nextOrSame(dayOfWeek: DayOfWeek): TemporalAdjuster;
1013
+ /**
1014
+ * Returns the previous day-of-week adjuster, which adjusts the date to the first occurrence
1015
+ * of the specified day-of-week before the date being adjusted.
1016
+ *
1017
+ * The ISO calendar system behaves as follows:
1018
+ * - The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-10 (five
1019
+ * days earlier).
1020
+ * - The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-12 (three
1021
+ * days earlier).
1022
+ * - The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-08 (seven
1023
+ * days earlier).
1024
+ *
1025
+ * The behavior is suitable for use with most calendar systems. It uses the `DAY_OF_WEEK` field
1026
+ * and the `DAYS` unit, and assumes a seven day week.
1027
+ */
1028
+ function previous(dayOfWeek: DayOfWeek): TemporalAdjuster;
1029
+ /**
1030
+ * Returns the previous-or-same day-of-week adjuster, which adjusts the date to the first
1031
+ * occurrence of the specified day-of-week before the date being adjusted unless it is already
1032
+ * on that day in which case the same object is returned.
1033
+ *
1034
+ * The ISO calendar system behaves as follows:
1035
+ * - The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-10 (five
1036
+ * days earlier).
1037
+ * - The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-12 (three
1038
+ * days earlier).
1039
+ * - The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-15 (same
1040
+ * as input).
1041
+ *
1042
+ * The behavior is suitable for use with most calendar systems. It uses the `DAY_OF_WEEK`
1043
+ * field and the `DAYS` unit, and assumes a seven day week.
1044
+ */
1045
+ function previousOrSame(dayOfWeek: DayOfWeek): TemporalAdjuster;
1046
+ }
1047
+
1048
+ export namespace TemporalQueries {
1049
+ function chronology(): TemporalQuery<Chronology | null>;
1050
+ function localDate(): TemporalQuery<LocalDate | null>;
1051
+ function localTime(): TemporalQuery<LocalTime | null>;
1052
+ function offset(): TemporalQuery<ZoneOffset | null>;
1053
+ function precision(): TemporalQuery<TemporalUnit | null>;
1054
+ function zone(): TemporalQuery<ZoneId | null>;
1055
+ function zoneId(): TemporalQuery<ZoneId | null>;
1056
+ }
1057
+
1058
+ // ----------------------------------------------------------------------------
1059
+ // MAIN
1060
+ // ----------------------------------------------------------------------------
1061
+
1062
+ export abstract class Clock {
1063
+ static fixed(fixedInstant: Instant, zoneId: ZoneId): Clock;
1064
+ static offset(baseClock: Clock, offsetDuration: Duration): Clock;
1065
+ static system(zone: ZoneId): Clock;
1066
+ static systemDefaultZone(): Clock;
1067
+ static systemUTC(): Clock;
1068
+
1069
+ abstract equals(other: any): boolean;
1070
+ abstract instant(): Instant;
1071
+ abstract millis(): number;
1072
+ abstract withZone(zone: ZoneId): Clock;
1073
+ abstract zone(): ZoneId;
1074
+ }
1075
+
1076
+ export class Duration extends TemporalAmount {
1077
+ static ZERO: Duration;
1078
+
1079
+ static between(startInclusive: Temporal, endExclusive: Temporal): Duration;
1080
+ static from(amount: TemporalAmount): Duration;
1081
+ static of(amount: number, unit: TemporalUnit): Duration;
1082
+ static ofDays(days: number): Duration;
1083
+ static ofHours(hours: number): Duration;
1084
+ static ofMillis(millis: number): Duration;
1085
+ static ofMinutes(minutes: number): Duration;
1086
+ static ofNanos(nanos: number): Duration;
1087
+ static ofSeconds(seconds: number, nanoAdjustment?: number): Duration;
1088
+ static parse(text: string): Duration;
1089
+
1090
+ private constructor();
1091
+
1092
+ abs(): Duration;
1093
+ addTo<T extends Temporal>(temporal: T): T;
1094
+ compareTo(otherDuration: Duration): number;
1095
+ dividedBy(divisor: number): Duration;
1096
+ equals(other: any): boolean;
1097
+ get(unit: TemporalUnit): number;
1098
+ isNegative(): boolean;
1099
+ isZero(): boolean;
1100
+ minus(amount: number, unit: TemporalUnit): Duration;
1101
+ minus(duration: Duration): Duration;
1102
+ minusDays(daysToSubtract: number): Duration;
1103
+ minusHours(hoursToSubtract: number): Duration;
1104
+ minusMillis(millisToSubtract: number): Duration;
1105
+ minusMinutes(minutesToSubtract: number): Duration;
1106
+ minusNanos(nanosToSubtract: number): Duration;
1107
+ minusSeconds(secondsToSubtract: number): Duration;
1108
+ multipliedBy(multiplicand: number): Duration;
1109
+ nano(): number;
1110
+ negated(): Duration;
1111
+ plus(amount: number, unit: TemporalUnit): Duration;
1112
+ plus(duration: Duration): Duration;
1113
+ plusDays(daysToAdd: number): Duration;
1114
+ plusHours(hoursToAdd: number): Duration;
1115
+ plusMillis(millisToAdd: number): Duration;
1116
+ plusMinutes(minutesToAdd: number): Duration;
1117
+ plusNanos(nanosToAdd: number): Duration;
1118
+ plusSeconds(secondsToAdd: number): Duration;
1119
+ plusSecondsNanos(secondsToAdd: number, nanosToAdd: number): Duration;
1120
+ seconds(): number;
1121
+ subtractFrom<T extends Temporal>(temporal: T): T;
1122
+ toDays(): number;
1123
+ toHours(): number;
1124
+ toJSON(): string;
1125
+ toMillis(): number;
1126
+ toMinutes(): number;
1127
+ toNanos(): number;
1128
+ toString(): string;
1129
+ units(): TemporalUnit[];
1130
+ withNanos(nanoOfSecond: number): Duration;
1131
+ withSeconds(seconds: number): Duration;
1132
+ }
1133
+
1134
+ export class Instant extends Temporal implements TemporalAdjuster {
1135
+ static EPOCH: Instant;
1136
+ static MIN: Instant;
1137
+ static MAX: Instant;
1138
+ static MIN_SECONDS: Instant;
1139
+ static MAX_SECONDS: Instant;
1140
+
1141
+ static FROM: TemporalQuery<Instant>;
1142
+
1143
+ static from(temporal: TemporalAccessor): Instant;
1144
+ static now(clock?: Clock): Instant;
1145
+ static ofEpochMilli(epochMilli: number): Instant;
1146
+ static ofEpochSecond(epochSecond: number, nanoAdjustment?: number): Instant;
1147
+ static parse(text: string): Instant;
1148
+
1149
+ private constructor();
1150
+
1151
+ adjustInto(temporal: Temporal): Temporal;
1152
+ atZone(zone: ZoneId): ZonedDateTime;
1153
+ compareTo(otherInstant: Instant): number;
1154
+ epochSecond(): number;
1155
+ equals(other: any): boolean;
1156
+ getLong(field: TemporalField): number;
1157
+ hashCode(): number;
1158
+ isAfter(otherInstant: Instant): boolean;
1159
+ isBefore(otherInstant: Instant): boolean;
1160
+ isSupported(fieldOrUnit: TemporalField | TemporalUnit): boolean;
1161
+ minus(amount: TemporalAmount): Instant;
1162
+ minus(amountToSubtract: number, unit: TemporalUnit): Instant;
1163
+ minusMillis(millisToSubtract: number): Instant;
1164
+ minusNanos(nanosToSubtract: number): Instant;
1165
+ minusSeconds(secondsToSubtract: number): Instant;
1166
+ nano(): number;
1167
+ plus(amount: TemporalAmount): Instant;
1168
+ plus(amountToAdd: number, unit: TemporalUnit): Instant;
1169
+ plusMillis(millisToAdd: number): Instant;
1170
+ plusNanos(nanosToAdd: number): Instant;
1171
+ plusSeconds(secondsToAdd: number): Instant;
1172
+ toEpochMilli(): number;
1173
+ toJSON(): string;
1174
+ toString(): string;
1175
+ truncatedTo(unit: TemporalUnit): Instant;
1176
+ until(endExclusive: Temporal, unit: TemporalUnit): number;
1177
+ with(adjuster: TemporalAdjuster): Instant;
1178
+ with(field: TemporalField, newValue: number): Instant;
1179
+ }
1180
+
1181
+ export class LocalDate extends ChronoLocalDate implements TemporalAdjuster {
1182
+ static MIN: LocalDate;
1183
+ static MAX: LocalDate;
1184
+ static EPOCH_0: LocalDate;
1185
+
1186
+ static FROM: TemporalQuery<LocalDate>;
1187
+
1188
+ static from(temporal: TemporalAccessor): LocalDate;
1189
+ static now(clockOrZone?: Clock | ZoneId): LocalDate;
1190
+ static of(year: number, month: Month | number, dayOfMonth: number): LocalDate;
1191
+ static ofEpochDay(epochDay: number): LocalDate;
1192
+ static ofInstant(instant: Instant, zoneId?: ZoneId): LocalDate;
1193
+ static ofYearDay(year: number, dayOfYear: number): LocalDate;
1194
+ static parse(text: string, formatter?: DateTimeFormatter): LocalDate;
1195
+
1196
+ private constructor();
1197
+
1198
+ atStartOfDay(): LocalDateTime;
1199
+ atStartOfDay(zone: ZoneId): ZonedDateTime;
1200
+ atTime(hour: number, minute: number, second?: number, nanoOfSecond?: number): LocalDateTime;
1201
+ atTime(time: LocalTime): LocalDateTime;
1202
+ chronology(): Chronology;
1203
+ compareTo(other: LocalDate): number;
1204
+ dayOfMonth(): number;
1205
+ dayOfWeek(): DayOfWeek;
1206
+ dayOfYear(): number;
1207
+ equals(other: any): boolean;
1208
+ getLong(field: TemporalField): number;
1209
+ hashCode(): number;
1210
+ isAfter(other: LocalDate): boolean;
1211
+ isBefore(other: LocalDate): boolean;
1212
+ isEqual(other: LocalDate): boolean;
1213
+ isLeapYear(): boolean;
1214
+ isoWeekOfWeekyear(): number;
1215
+ isoWeekyear(): number;
1216
+ isSupported(fieldOrUnit: TemporalField | TemporalUnit): boolean;
1217
+ lengthOfMonth(): number;
1218
+ lengthOfYear(): number;
1219
+ minus(amount: TemporalAmount): LocalDate;
1220
+ minus(amountToSubtract: number, unit: TemporalUnit): LocalDate;
1221
+ minusDays(daysToSubtract: number): LocalDate;
1222
+ minusMonths(monthsToSubtract: number): LocalDate;
1223
+ minusWeeks(weeksToSubtract: number): LocalDate;
1224
+ minusYears(yearsToSubtract: number): LocalDate;
1225
+ month(): Month;
1226
+ monthValue(): number;
1227
+ plus(amount: TemporalAmount): LocalDate;
1228
+ plus(amountToAdd: number, unit: TemporalUnit): LocalDate;
1229
+ plusDays(daysToAdd: number): LocalDate;
1230
+ plusMonths(monthsToAdd: number): LocalDate;
1231
+ plusWeeks(weeksToAdd: number): LocalDate;
1232
+ plusYears(yearsToAdd: number): LocalDate;
1233
+ toEpochDay(): number;
1234
+ toJSON(): string;
1235
+ toString(): string;
1236
+ until(endDate: TemporalAccessor): Period;
1237
+ until(endExclusive: Temporal, unit: TemporalUnit): number;
1238
+ with(adjuster: TemporalAdjuster): LocalDate;
1239
+ with(field: TemporalField, newValue: number): LocalDate;
1240
+ withDayOfMonth(dayOfMonth: number): LocalDate;
1241
+ withDayOfYear(dayOfYear: number): LocalDate;
1242
+ withMonth(month: Month | number): LocalDate;
1243
+ withYear(year: number): LocalDate;
1244
+ year(): number;
1245
+ }
1246
+
1247
+ export class LocalDateTime extends ChronoLocalDateTime implements TemporalAdjuster {
1248
+ static MIN: LocalDateTime;
1249
+ static MAX: LocalDateTime;
1250
+
1251
+ static FROM: TemporalQuery<LocalDateTime>;
1252
+
1253
+ static from(temporal: TemporalAccessor): LocalDateTime;
1254
+ static now(clockOrZone?: Clock | ZoneId): LocalDateTime;
1255
+ static of(date: LocalDate, time: LocalTime): LocalDateTime;
1256
+ static of(year: number, month: Month | number, dayOfMonth: number, hour?: number, minute?: number, second?: number, nanoSecond?: number): LocalDateTime;
1257
+ static ofEpochSecond(epochSecond: number, nanoOfSecond: number, offset: ZoneOffset): LocalDateTime;
1258
+ static ofEpochSecond(epochSecond: number, offset: ZoneOffset): LocalDateTime;
1259
+ static ofInstant(instant: Instant, zoneId?: ZoneId): LocalDateTime;
1260
+ static parse(text: string, formatter?: DateTimeFormatter): LocalDateTime;
1261
+
1262
+ private constructor();
1263
+
1264
+ atOffset(offset: ZoneOffset): OffsetDateTime;
1265
+ atZone(zone: ZoneId): ZonedDateTime;
1266
+ compareTo(other: LocalDateTime): number;
1267
+ dayOfMonth(): number;
1268
+ dayOfWeek(): DayOfWeek;
1269
+ dayOfYear(): number;
1270
+ equals(other: any): boolean;
1271
+ format(formatter: DateTimeFormatter): string;
1272
+ getLong(field: TemporalField): number;
1273
+ hashCode(): number;
1274
+ hour(): number;
1275
+ isAfter(other: LocalDateTime): boolean;
1276
+ isBefore(other: LocalDateTime): boolean;
1277
+ isEqual(other: LocalDateTime): boolean;
1278
+ isSupported(fieldOrUnit: TemporalField | TemporalUnit): boolean;
1279
+ minus(amount: TemporalAmount): LocalDateTime;
1280
+ minus(amountToSubtract: number, unit: TemporalUnit): LocalDateTime;
1281
+ minusDays(days: number): LocalDateTime;
1282
+ minusHours(hours: number): LocalDateTime;
1283
+ minusMinutes(minutes: number): LocalDateTime;
1284
+ minusMonths(months: number): LocalDateTime;
1285
+ minusNanos(nanos: number): LocalDateTime;
1286
+ minusSeconds(seconds: number): LocalDateTime;
1287
+ minusWeeks(weeks: number): LocalDateTime;
1288
+ minusYears(years: number): LocalDateTime;
1289
+ minute(): number;
1290
+ month(): Month;
1291
+ monthValue(): number;
1292
+ nano(): number;
1293
+ plus(amount: TemporalAmount): LocalDateTime;
1294
+ plus(amountToAdd: number, unit: TemporalUnit): LocalDateTime;
1295
+ plusDays(days: number): LocalDateTime;
1296
+ plusHours(hours: number): LocalDateTime;
1297
+ plusMinutes(minutes: number): LocalDateTime;
1298
+ plusMonths(months: number): LocalDateTime;
1299
+ plusNanos(nanos: number): LocalDateTime;
1300
+ plusSeconds(seconds: number): LocalDateTime;
1301
+ plusWeeks(weeks: number): LocalDateTime;
1302
+ plusYears(years: number): LocalDateTime;
1303
+ second(): number;
1304
+ toJSON(): string;
1305
+ toLocalDate(): LocalDate;
1306
+ toLocalTime(): LocalTime;
1307
+ toString(): string;
1308
+ truncatedTo(unit: TemporalUnit): LocalDateTime;
1309
+ until(endExclusive: Temporal, unit: TemporalUnit): number;
1310
+ with(adjuster: TemporalAdjuster): LocalDateTime;
1311
+ with(field: TemporalField, newValue: number): LocalDateTime;
1312
+ withDayOfMonth(dayOfMonth: number): LocalDateTime;
1313
+ withDayOfYear(dayOfYear: number): LocalDateTime;
1314
+ withHour(hour: number): LocalDateTime;
1315
+ withMinute(minute: number): LocalDateTime;
1316
+ withMonth(month: number | Month): LocalDateTime;
1317
+ withNano(nanoOfSecond: number): LocalDateTime;
1318
+ withSecond(second: number): LocalDateTime;
1319
+ withYear(year: number): LocalDateTime;
1320
+ year(): number;
1321
+ }
1322
+
1323
+ export class LocalTime extends Temporal implements TemporalAdjuster {
1324
+ static MIN: LocalTime;
1325
+ static MAX: LocalTime;
1326
+ static MIDNIGHT: LocalTime;
1327
+ static NOON: LocalTime;
1328
+ static HOURS_PER_DAY: number;
1329
+ static MINUTES_PER_HOUR: number;
1330
+ static MINUTES_PER_DAY: number;
1331
+ static SECONDS_PER_MINUTE: number;
1332
+ static SECONDS_PER_HOUR: number;
1333
+ static SECONDS_PER_DAY: number;
1334
+ static MILLIS_PER_DAY: number;
1335
+ static MICROS_PER_DAY: number;
1336
+ static NANOS_PER_SECOND: number;
1337
+ static NANOS_PER_MINUTE: number;
1338
+ static NANOS_PER_HOUR: number;
1339
+ static NANOS_PER_DAY: number;
1340
+
1341
+ static FROM: TemporalQuery<LocalTime>;
1342
+
1343
+ static from(temporal: TemporalAccessor): LocalTime;
1344
+ static now(clockOrZone?: Clock | ZoneId): LocalTime;
1345
+ static of(hour?: number, minute?: number, second?: number, nanoOfSecond?: number): LocalTime;
1346
+ static ofInstant(instant: Instant, zone?: ZoneId): LocalTime;
1347
+ static ofNanoOfDay(nanoOfDay: number): LocalTime;
1348
+ static ofSecondOfDay(secondOfDay?: number, nanoOfSecond?: number): LocalTime;
1349
+ static parse(text: String, formatter?: DateTimeFormatter): LocalTime;
1350
+
1351
+ private constructor();
1352
+
1353
+ adjustInto(temporal: Temporal): Temporal;
1354
+ atDate(date: LocalDate): LocalDateTime;
1355
+ compareTo(other: LocalTime): number;
1356
+ equals(other: any): boolean;
1357
+ format(formatter: DateTimeFormatter): string;
1358
+ getLong(field: ChronoField): number;
1359
+ hashCode(): number;
1360
+ hour(): number;
1361
+ isAfter(other: LocalTime): boolean;
1362
+ isBefore(other: LocalTime): boolean;
1363
+ isSupported(fieldOrUnit: TemporalField | TemporalUnit): boolean;
1364
+ minus(amount: TemporalAmount): LocalTime;
1365
+ minus(amountToSubtract: number, unit: TemporalUnit): LocalTime;
1366
+ minusHours(hoursToSubtract: number): LocalTime;
1367
+ minusMinutes(minutesToSubtract: number): LocalTime;
1368
+ minusNanos(nanosToSubtract: number): LocalTime;
1369
+ minusSeconds(secondsToSubtract: number): LocalTime;
1370
+ minute(): number;
1371
+ nano(): number;
1372
+ plus(amount: TemporalAmount): LocalTime;
1373
+ plus(amountToAdd: number, unit: TemporalUnit): LocalTime;
1374
+ plusHours(hoursToAdd: number): LocalTime;
1375
+ plusMinutes(minutesToAdd: number): LocalTime;
1376
+ plusNanos(nanosToAdd: number): LocalTime;
1377
+ plusSeconds(secondstoAdd: number): LocalTime;
1378
+ second(): number;
1379
+ toJSON(): string;
1380
+ toNanoOfDay(): number;
1381
+ toSecondOfDay(): number;
1382
+ toString(): string;
1383
+ toString(): string;
1384
+ truncatedTo(unit: ChronoUnit): LocalTime;
1385
+ until(endExclusive: Temporal, unit: TemporalUnit): number;
1386
+ with(adjuster: TemporalAdjuster): LocalTime;
1387
+ with(field: TemporalField, newValue: number): LocalTime;
1388
+ withHour(hour: number): LocalTime;
1389
+ withMinute(minute: number): LocalTime;
1390
+ withNano(nanoOfSecond: number): LocalTime;
1391
+ withSecond(second: number): LocalTime;
1392
+ }
1393
+
1394
+ export class MonthDay extends TemporalAccessor implements TemporalAdjuster {
1395
+ static FROM: TemporalQuery<MonthDay>;
1396
+
1397
+ static from(temporal: TemporalAccessor): MonthDay;
1398
+ static now(zoneIdOrClock?: ZoneId | Clock): MonthDay;
1399
+ static of(month: Month | number, dayOfMonth: number): MonthDay;
1400
+ static parse(text: string, formatter?: DateTimeFormatter): MonthDay;
1401
+
1402
+ private constructor();
1403
+
1404
+ adjustInto(temporal: Temporal): Temporal;
1405
+ atYear(year: number): LocalDate;
1406
+ compareTo(other: MonthDay): number;
1407
+ dayOfMonth(): number;
1408
+ equals(other: any): boolean;
1409
+ format(formatter: DateTimeFormatter): string;
1410
+ getLong(field: TemporalField): number;
1411
+ isAfter(other: MonthDay): boolean;
1412
+ isBefore(other: MonthDay): boolean;
1413
+ isSupported(field: TemporalField): boolean;
1414
+ isValidYear(year: number): boolean;
1415
+ month(): Month;
1416
+ monthValue(): number;
1417
+ toJSON(): string;
1418
+ toString(): string;
1419
+ with(month: Month): MonthDay;
1420
+ withDayOfMonth(dayOfMonth: number): MonthDay;
1421
+ withMonth(month: number): MonthDay;
1422
+ }
1423
+
1424
+ export class Period extends TemporalAmount {
1425
+ static ZERO: Period;
1426
+
1427
+ static between(startDate: LocalDate, endDate: LocalDate): Period;
1428
+ static from(amount: TemporalAmount): Period;
1429
+ static of(years: number, months: number, days: number): Period;
1430
+ static ofDays(days: number): Period;
1431
+ static ofMonths(months: number): Period;
1432
+ static ofWeeks(weeks: number): Period;
1433
+ static ofYears(years: number): Period;
1434
+ static parse(text: string): Period;
1435
+
1436
+ private constructor();
1437
+
1438
+ addTo<T extends Temporal>(temporal: T): T;
1439
+ chronology(): IsoChronology;
1440
+ days(): number;
1441
+ equals(other: any): boolean;
1442
+ get(unit: TemporalUnit): number;
1443
+ hashCode(): number;
1444
+ isNegative(): boolean;
1445
+ isZero(): boolean;
1446
+ minus(amountToSubtract: TemporalAmount): Period;
1447
+ minusDays(daysToSubtract: number): Period;
1448
+ minusMonths(monthsToSubtract: number): Period;
1449
+ minusYears(yearsToSubtract: number): Period;
1450
+ months(): number;
1451
+ multipliedBy(scalar: number): Period;
1452
+ negated(): Period;
1453
+ normalized(): Period;
1454
+ plus(amountToAdd: TemporalAmount): Period;
1455
+ plusDays(daysToAdd: number): Period;
1456
+ plusMonths(monthsToAdd: number): Period;
1457
+ plusYears(yearsToAdd: number): Period;
1458
+ subtractFrom<T extends Temporal>(temporal: T): T;
1459
+ toJSON(): string;
1460
+ toString(): string;
1461
+ toTotalMonths(): number;
1462
+ units(): TemporalUnit[];
1463
+ withDays(days: number): Period;
1464
+ withMonths(months: number): Period;
1465
+ withYears(years: number): Period;
1466
+ years(): number;
1467
+ }
1468
+
1469
+ export class Year extends Temporal implements TemporalAdjuster {
1470
+ static MIN_VALUE: number;
1471
+ static MAX_VALUE: number;
1472
+
1473
+ static FROM: TemporalQuery<Year>;
1474
+
1475
+ static from(temporal: TemporalAccessor): Year;
1476
+ static isLeap(year: number): boolean;
1477
+ static now(zoneIdOrClock?: ZoneId | Clock): Year;
1478
+ static of(isoYear: number): Year;
1479
+ static parse(text: string, formatter?: DateTimeFormatter): Year;
1480
+
1481
+ private constructor();
1482
+
1483
+ adjustInto(temporal: Temporal): Temporal;
1484
+ atDay(dayOfYear: number): LocalDate;
1485
+ atMonth(month: Month | number): YearMonth;
1486
+ atMonthDay(monthDay: MonthDay): LocalDate;
1487
+ compareTo(other: Year): number;
1488
+ equals(other: any): boolean;
1489
+ getLong(field: TemporalField): number;
1490
+ isAfter(other: Year): boolean;
1491
+ isBefore(other: Year): boolean;
1492
+ isLeap(): boolean;
1493
+ isSupported(fieldOrUnit: TemporalField | TemporalUnit): boolean;
1494
+ isValidMonthDay(monthDay: MonthDay): boolean;
1495
+ length(): number;
1496
+ minus(amount: TemporalAmount): Year;
1497
+ minus(amountToSubtract: number, unit: TemporalUnit): Year;
1498
+ minusYears(yearsToSubtract: number): Year;
1499
+ plus(amount: TemporalAmount): Year;
1500
+ plus(amountToAdd: number, unit: TemporalUnit): Year;
1501
+ plusYears(yearsToAdd: number): Year;
1502
+ toJSON(): string;
1503
+ toString(): string;
1504
+ until(endExclusive: Temporal, unit: TemporalUnit): number;
1505
+ value(): number;
1506
+ with(adjuster: TemporalAdjuster): Year;
1507
+ with(field: TemporalField, newValue: number): Year;
1508
+ }
1509
+
1510
+ export class YearMonth extends Temporal implements TemporalAdjuster {
1511
+ static FROM: TemporalQuery<YearMonth>;
1512
+
1513
+ static from(temporal: TemporalAccessor): YearMonth;
1514
+ static now(zoneIdOrClock?: ZoneId | Clock): YearMonth;
1515
+ static of(year: number, monthOrNumber: Month | number): YearMonth;
1516
+ static parse(text: string, formatter?: DateTimeFormatter): YearMonth;
1517
+
1518
+ private constructor();
1519
+
1520
+ adjustInto(temporal: Temporal): Temporal;
1521
+ atDay(dayOfMonth: number): LocalDate;
1522
+ atEndOfMonth(): LocalDate;
1523
+ compareTo(other: YearMonth): number;
1524
+ equals(other: any): boolean;
1525
+ format(formatter: DateTimeFormatter): string;
1526
+ getLong(field: TemporalField): number;
1527
+ isAfter(other: YearMonth): boolean;
1528
+ isBefore(other: YearMonth): boolean;
1529
+ isLeapYear(): boolean;
1530
+ isSupported(fieldOrUnit: TemporalField | TemporalUnit): boolean;
1531
+ isValidDay(): boolean;
1532
+ lengthOfMonth(): number;
1533
+ lengthOfYear(): number;
1534
+ minus(amount: TemporalAmount): YearMonth;
1535
+ minus(amountToSubtract: number, unit: TemporalUnit): YearMonth;
1536
+ minusMonths(monthsToSubtract: number): YearMonth;
1537
+ minusYears(yearsToSubtract: number): YearMonth;
1538
+ month(): Month;
1539
+ monthValue(): number;
1540
+ plus(amount: TemporalAmount): YearMonth;
1541
+ plus(amountToAdd: number, unit: TemporalUnit): YearMonth;
1542
+ plusMonths(monthsToAdd: number): YearMonth;
1543
+ plusYears(yearsToAdd: number): YearMonth;
1544
+ toJSON(): string;
1545
+ until(endExclusive: Temporal, unit: TemporalUnit): number;
1546
+ with(adjuster: TemporalAdjuster): YearMonth;
1547
+ with(field: TemporalField, newValue: number): YearMonth;
1548
+ withMonth(month: number): YearMonth;
1549
+ withYear(year: number): YearMonth;
1550
+ year(): number;
1551
+ }
1552
+
1553
+ /**
1554
+ * A date-time with an offset from UTC/Greenwich in the ISO-8601 calendar system, such as
1555
+ * `2007-12-03T10:15:30+01:00`.
1556
+ *
1557
+ * `OffsetDateTime` is an immutable representation of a date-time with an offset. This class stores
1558
+ * all date and time fields, to a precision of nanoseconds, as well as the offset from
1559
+ * UTC/Greenwich. For example, the value "2nd October 2007 at 13:45:30.123456789 +02:00" can be
1560
+ * stored in an `OffsetDateTime`.
1561
+ *
1562
+ * `OffsetDateTime`, `ZonedDateTime` and `Instant` all store an instant on the time-line to
1563
+ * nanosecond precision. `Instant` is the simplest, simply representing the instant. `OffsetDateTime`
1564
+ * adds to the instant the offset from UTC/Greenwich, which allows the local date-time to be obtained.
1565
+ * `ZonedDateTime` adds full time-zone rules.
1566
+ *
1567
+ * It is intended that `ZonedDateTime` or `Instant` is used to model data in simpler applications. This
1568
+ * class may be used when modeling date-time concepts in more detail, or when communicating to a
1569
+ * database or in a network protocol.
1570
+ *
1571
+ * This is a value-based class; use of identity-sensitive operations (including reference equality
1572
+ * (`==`), identity hash code, or synchronization) on instances of `OffsetDateTime` may have
1573
+ * unpredictable results and should be avoided. The `equals` method should be used for comparisons.
1574
+ */
1575
+ export class OffsetDateTime extends Temporal implements TemporalAdjuster {
1576
+ static MIN: OffsetDateTime;
1577
+ static MAX: OffsetDateTime;
1578
+ static FROM: TemporalQuery<OffsetDateTime>;
1579
+
1580
+ static from(temporal: TemporalAccessor): OffsetDateTime
1581
+ static now(clockOrZone?: Clock | ZoneId): OffsetDateTime;
1582
+ static of(dateTime: LocalDateTime, offset: ZoneOffset): OffsetDateTime;
1583
+ static of(date: LocalDate, time: LocalTime, offset: ZoneOffset): OffsetDateTime;
1584
+ static of(year: number, month: number, day: number, hour: number, minute: number, second: number, nanoOfSecond: number, offset: ZoneOffset): OffsetDateTime;
1585
+ static ofInstant(instant: Instant, zone: ZoneId): OffsetDateTime;
1586
+ static parse(text: string, formatter?: DateTimeFormatter): OffsetDateTime;
1587
+
1588
+ private constructor();
1589
+
1590
+ adjustInto(temporal: Temporal): Temporal
1591
+ atZoneSameInstant(zone: ZoneId): ZonedDateTime
1592
+ atZoneSimilarLocal(zone: ZoneId): ZonedDateTime
1593
+ compareTo(other: OffsetDateTime): number
1594
+ equals(obj: any): boolean
1595
+ format(formatter: DateTimeFormatter): string
1596
+ get(field: TemporalField): number
1597
+ dayOfMonth(): number
1598
+ dayOfWeek(): DayOfWeek
1599
+ dayOfYear(): number
1600
+ hour(): number
1601
+ getLong(field: TemporalField): number
1602
+ minute(): number
1603
+ month(): Month
1604
+ monthValue(): number
1605
+ nano(): number
1606
+ offset(): ZoneOffset
1607
+ second(): number
1608
+ year(): number
1609
+ hashCode(): number
1610
+ isAfter(other: OffsetDateTime): boolean
1611
+ isBefore(other: OffsetDateTime): boolean
1612
+ isEqual(other: OffsetDateTime): boolean
1613
+ isSupported(fieldOrUnit: TemporalField | TemporalUnit): boolean
1614
+ minus(amountToSubtract: number, unit: TemporalUnit): OffsetDateTime
1615
+ minus(amountToSubtract: TemporalAmount): OffsetDateTime
1616
+ minusDays(days: number): OffsetDateTime
1617
+ minusHours(hours: number): OffsetDateTime
1618
+ minusMinutes(minutes: number): OffsetDateTime
1619
+ minusMonths(months: number): OffsetDateTime
1620
+ minusNanos(nanos: number): OffsetDateTime
1621
+ minusSeconds(seconds: number): OffsetDateTime
1622
+ minusWeeks(weeks: number): OffsetDateTime
1623
+ minusYears(years: number): OffsetDateTime
1624
+ plus(amountToAdd: number, unit: TemporalUnit): OffsetDateTime
1625
+ plus(amountToAdd: TemporalAmount): OffsetDateTime
1626
+ plusDays(days: number): OffsetDateTime
1627
+ plusHours(hours: number): OffsetDateTime
1628
+ plusMinutes(minutes: number): OffsetDateTime
1629
+ plusMonths(months: number): OffsetDateTime
1630
+ plusNanos(nanos: number): OffsetDateTime
1631
+ plusSeconds(seconds: number): OffsetDateTime
1632
+ plusWeeks(weeks: number): OffsetDateTime
1633
+ plusYears(years: number): OffsetDateTime
1634
+ query<T>(query: TemporalQuery<T>): T
1635
+ range(field: TemporalField): ValueRange
1636
+ toEpochSecond(): number
1637
+ toJSON(): string;
1638
+ toInstant(): Instant
1639
+ toLocalDate(): LocalDate
1640
+ toLocalDateTime(): LocalDateTime
1641
+ toLocalTime(): LocalTime
1642
+ toOffsetTime(): OffsetTime
1643
+ toString(): string
1644
+ truncatedTo(unit: TemporalUnit): OffsetDateTime
1645
+ until(endExclusive: Temporal, unit: TemporalUnit): number
1646
+ with(adjuster: TemporalAdjuster): OffsetDateTime
1647
+ with(field: TemporalField, newValue: number): OffsetDateTime
1648
+ withDayOfMonth(dayOfMonth: number): OffsetDateTime
1649
+ withDayOfYear(dayOfYear: number): OffsetDateTime
1650
+ withHour(hour: number): OffsetDateTime
1651
+ withMinute(minute: number): OffsetDateTime
1652
+ withMonth(month: number): OffsetDateTime
1653
+ withNano(nanoOfSecond: number): OffsetDateTime
1654
+ withOffsetSameInstant(offset: ZoneOffset): OffsetDateTime
1655
+ withOffsetSameLocal(offset: ZoneOffset): OffsetDateTime
1656
+ withSecond(second: number): OffsetDateTime
1657
+ withYear(year: number): OffsetDateTime
1658
+ }
1659
+
1660
+ /**
1661
+ * A time with an offset from UTC/Greenwich in the ISO-8601 calendar system, such as `10:15:30+01:00`.
1662
+ *
1663
+ * `OffsetTime` is an immutable date-time object that represents a time, often viewed as
1664
+ * hour-minute-second-offset. This class stores all time fields, to a precision of nanoseconds, as
1665
+ * well as a zone offset. For example, the value "13:45:30.123456789+02:00" can be stored in an
1666
+ * `OffsetTime`.
1667
+ *
1668
+ * This is a value-based class; use of identity-sensitive operations (including reference equality
1669
+ * (`==`), identity hash code, or synchronization) on instances of `OffsetTime` may have
1670
+ * unpredictable results and should be avoided. The `equals` method should be used for comparisons.
1671
+ */
1672
+ export class OffsetTime extends Temporal implements TemporalAdjuster {
1673
+ static MIN: OffsetTime;
1674
+ static MAX: OffsetTime;
1675
+ static FROM: TemporalQuery<OffsetTime>;
1676
+
1677
+ static from(temporal: TemporalAccessor): OffsetTime
1678
+ static now(clockOrZone?: Clock | ZoneId): OffsetTime;
1679
+ static of(time: LocalTime, offset: ZoneOffset): OffsetTime;
1680
+ static of(hour: number, minute: number, second: number, nanoOfSecond: number, offset: ZoneOffset): OffsetTime;
1681
+ static ofInstant(instant: Instant, zone: ZoneId): OffsetTime;
1682
+ static parse(text: string, formatter?: DateTimeFormatter): OffsetTime;
1683
+
1684
+ private constructor();
1685
+
1686
+ adjustInto(temporal: Temporal): Temporal
1687
+ atDate(date: LocalDate): OffsetDateTime
1688
+ compareTo(other: OffsetTime): number
1689
+ equals(other: any): boolean
1690
+ format(formatter: DateTimeFormatter): string
1691
+ get(field: TemporalField): number
1692
+ hour(): number
1693
+ getLong(field: TemporalField): number
1694
+ minute(): number
1695
+ nano(): number
1696
+ offset(): ZoneOffset
1697
+ second(): number
1698
+ hashCode(): number
1699
+ isAfter(other: OffsetTime): boolean
1700
+ isBefore(other: OffsetTime): boolean
1701
+ isEqual(other: OffsetTime): boolean
1702
+ isSupported(fieldOrUnit: TemporalField | TemporalUnit): boolean
1703
+ minus(amountToSubtract: number, unit: TemporalUnit): OffsetTime
1704
+ minus(amountToSubtract: TemporalAmount): OffsetTime
1705
+ minusHours(hours: number): OffsetTime
1706
+ minusMinutes(minutes: number): OffsetTime
1707
+ minusNanos(nanos: number): OffsetTime
1708
+ minusSeconds(seconds: number): OffsetTime
1709
+ plus(amountToAdd: number, unit: TemporalUnit): OffsetTime
1710
+ plus(amountToAdd: TemporalAmount): OffsetTime
1711
+ plusHours(hours: number): OffsetTime
1712
+ plusMinutes(minutes: number): OffsetTime
1713
+ plusNanos(nanos: number): OffsetTime
1714
+ plusSeconds(seconds: number): OffsetTime
1715
+ query<T>(query: TemporalQuery<T>): T
1716
+ range(field: TemporalField): ValueRange
1717
+ toEpochSecond(date: LocalDate): number
1718
+ toJSON(): string;
1719
+ toLocalTime(): LocalTime
1720
+ toString(): string
1721
+ truncatedTo(unit: TemporalUnit): OffsetTime
1722
+ until(endExclusive: Temporal, unit: TemporalUnit): number
1723
+ with(adjuster: TemporalAdjuster): OffsetTime
1724
+ with(field: TemporalField, newValue: number): OffsetTime
1725
+ withHour(hour: number): OffsetTime
1726
+ withMinute(minute: number): OffsetTime
1727
+ withNano(nanoOfSecond: number): OffsetTime
1728
+ withOffsetSameInstant(offset: ZoneOffset): OffsetTime
1729
+ withOffsetSameLocal(offset: ZoneOffset): OffsetTime
1730
+ withSecond(second: number): OffsetTime
1731
+ }
1732
+
1733
+ /**
1734
+ * A date-time with a time-zone in the ISO-8601 calendar system, such as
1735
+ * `2007-12-23T10:15:30+01:00 Europe/Paris`.
1736
+ *
1737
+ * `ZonedDateTime` is an immutable representation of a date-time with a time-zone. This class
1738
+ * stores all date and time fields, to a precision of nanoseconds, and a time-zone, with a zone
1739
+ * offset used to handle ambiguous local date-times. For example, the value "2nd October 2007 at
1740
+ * 13:45.30.123456789 +02:00 in the Europe/Paris time-zone" can be stored in a `ZonedDateTime`.
1741
+ *
1742
+ * This class handles conversion from the local time-line of `LocalDateTime` to the instant
1743
+ * time-line of `Instant`. The difference between the two time-lines is the offset from
1744
+ * UTC/Greenwich, represented by a `ZoneOffset`.
1745
+ *
1746
+ * Converting between the two time-lines involves calculating the offset using the rules accessed
1747
+ * from the `ZoneId`. Obtaining the offset for an instant is simple, as there is exactly one valid
1748
+ * offset for each instant. By contrast, obtaining the offset for a local date-time is not
1749
+ * straightforward. There are three cases:
1750
+ * - Normal, with one valid offset. For the vast majority of the year, the normal case applies,
1751
+ * where there is a single valid offset for the local date-time.
1752
+ * - Gap, with zero valid offsets. This is when clocks jump forward typically due to the spring
1753
+ * daylight savings change from "winter" to "summer". In a gap there are local date-time values
1754
+ * with no valid offset.
1755
+ * - Overlap, with two valid offsets. This is when clocks are set back typically due to the autumn
1756
+ * daylight savings change from "summer" to "winter". In an overlap there are local date-time
1757
+ * values with two valid offsets.
1758
+ *
1759
+ * Any method that converts directly or implicitly from a local date-time to an instant by
1760
+ * obtaining the offset has the potential to be complicated.
1761
+ *
1762
+ * For Gaps, the general strategy is that if the local date-time falls in the middle of a Gap,
1763
+ * then the resulting zoned date-time will have a local date-time shifted forwards by the length
1764
+ * of the Gap, resulting in a date-time in the later offset, typically "summer" time.
1765
+ *
1766
+ * For Overlaps, the general strategy is that if the local date-time falls in the middle of an
1767
+ * Overlap, then the previous offset will be retained. If there is no previous offset, or the
1768
+ * previous offset is invalid, then the earlier offset is used, typically "summer" time. Two
1769
+ * additional methods, `withEarlierOffsetAtOverlap()` and `withLaterOffsetAtOverlap()`, help
1770
+ * manage the case of an overlap.
1771
+ */
1772
+ export class ZonedDateTime extends ChronoZonedDateTime {
1773
+ static FROM: TemporalQuery<ZonedDateTime>;
1774
+
1775
+ static from(temporal: TemporalAccessor): ZonedDateTime;
1776
+ static now(clockOrZone?: Clock | ZoneId): ZonedDateTime;
1777
+ static of(localDateTime: LocalDateTime, zone: ZoneId): ZonedDateTime;
1778
+ static of(date: LocalDate, time: LocalTime, zone: ZoneId): ZonedDateTime;
1779
+ static of(year: number, month: number, dayOfMonth: number, hour: number, minute: number, second: number, nanoOfSecond: number, zone: ZoneId): ZonedDateTime;
1780
+ /**
1781
+ * Obtains an instance of ZonedDateTime from an Instant.
1782
+ *
1783
+ * This creates a zoned date-time with the same instant as that specified. Calling
1784
+ * `ChronoZonedDateTime.toInstant()` will return an instant equal to the one used here.
1785
+ *
1786
+ * Converting an instant to a zoned date-time is simple as there is only one valid offset for
1787
+ * each instant.
1788
+ */
1789
+ static ofInstant(instant: Instant, zone: ZoneId): ZonedDateTime;
1790
+ /**
1791
+ * Obtains an instance of `ZonedDateTime` from the instant formed by combining the local
1792
+ * date-time and offset.
1793
+ *
1794
+ * This creates a zoned date-time by combining the `LocalDateTime` and `ZoneOffset`. This
1795
+ * combination uniquely specifies an instant without ambiguity.
1796
+ *
1797
+ * Converting an instant to a zoned date-time is simple as there is only one valid offset for
1798
+ * each instant. If the valid offset is different to the offset specified, the the date-time
1799
+ * and offset of the zoned date-time will differ from those specified.
1800
+ *
1801
+ * If the `ZoneId` to be used is a `ZoneOffset`, this method is equivalent to
1802
+ * `of(LocalDateTime, ZoneId)`.
1803
+ */
1804
+ static ofInstant(localDateTime: LocalDateTime, offset: ZoneOffset, zone: ZoneId): ZonedDateTime;
1805
+ /**
1806
+ * Obtains an instance of `ZonedDateTime` from a local date-time using the preferred offset
1807
+ * if possible.
1808
+ *
1809
+ * The local date-time is resolved to a single instant on the time-line. This is achieved by
1810
+ * finding a valid offset from UTC/Greenwich for the local date-time as defined by the rules
1811
+ * of the zone ID.
1812
+ *
1813
+ * In most cases, there is only one valid offset for a local date-time. In the case of an
1814
+ * overlap, where clocks are set back, there are two valid offsets. If the preferred offset
1815
+ * is one of the valid offsets then it is used. Otherwise the earlier valid offset is used,
1816
+ * typically corresponding to "summer".
1817
+ *
1818
+ * In the case of a gap, where clocks jump forward, there is no valid offset. Instead, the
1819
+ * local date-time is adjusted to be later by the length of the gap. For a typical one hour
1820
+ * daylight savings change, the local date-time will be moved one hour later into the offset
1821
+ * typically corresponding to "summer".
1822
+ */
1823
+ static ofLocal(localDateTime: LocalDateTime, zone: ZoneId, preferredOffset?: ZoneOffset | null): ZonedDateTime;
1824
+ /**
1825
+ * Obtains an instance of `ZonedDateTime` strictly validating the combination of local
1826
+ * date-time, offset and zone ID.
1827
+ *
1828
+ * This creates a zoned date-time ensuring that the offset is valid for the local date-time
1829
+ * according to the rules of the specified zone. If the offset is invalid, an exception is
1830
+ * thrown.
1831
+ */
1832
+ static ofStrict(localDateTime: LocalDateTime, offset: ZoneOffset, zone: ZoneId): ZonedDateTime;
1833
+ static parse(text: string, formatter?: DateTimeFormatter): ZonedDateTime;
1834
+
1835
+ private constructor();
1836
+
1837
+ dayOfMonth(): number;
1838
+ dayOfWeek(): DayOfWeek;
1839
+ dayOfYear(): number;
1840
+ equals(other: any): boolean;
1841
+ format(formatter: DateTimeFormatter): string;
1842
+ getLong(field: TemporalField): number;
1843
+ hashCode(): number;
1844
+ hour(): number;
1845
+ isSupported(fieldOrUnit: TemporalField | TemporalUnit): boolean;
1846
+ minus(amount: TemporalAmount): ZonedDateTime;
1847
+ minus(amountToSubtract: number, unit: TemporalUnit): ZonedDateTime;
1848
+ minusDays(days: number): ZonedDateTime;
1849
+ minusHours(hours: number): ZonedDateTime;
1850
+ minusMinutes(minutes: number): ZonedDateTime;
1851
+ minusMonths(months: number): ZonedDateTime;
1852
+ minusNanos(nanos: number): ZonedDateTime;
1853
+ minusSeconds(seconds: number): ZonedDateTime;
1854
+ minusWeeks(weeks: number): ZonedDateTime;
1855
+ minusYears(years: number): ZonedDateTime;
1856
+ minute(): number;
1857
+ month(): Month;
1858
+ monthValue(): number;
1859
+ nano(): number;
1860
+ offset(): ZoneOffset;
1861
+ plus(amount: TemporalAmount): ZonedDateTime;
1862
+ plus(amountToAdd: number, unit: TemporalUnit): ZonedDateTime;
1863
+ plusDays(days: number): ZonedDateTime;
1864
+ plusHours(hours: number): ZonedDateTime;
1865
+ plusMinutes(minutes: number): ZonedDateTime;
1866
+ plusMonths(months: number): ZonedDateTime;
1867
+ plusNanos(nanos: number): ZonedDateTime;
1868
+ plusSeconds(seconds: number): ZonedDateTime;
1869
+ plusWeeks(weeks: number): ZonedDateTime;
1870
+ plusYears(years: number): ZonedDateTime;
1871
+ range(field: TemporalField): ValueRange;
1872
+ second(): number;
1873
+ toJSON(): string;
1874
+ toLocalDate(): LocalDate;
1875
+ toLocalDateTime(): LocalDateTime;
1876
+ toLocalTime(): LocalTime;
1877
+ toOffsetDateTime(): OffsetDateTime;
1878
+ toString(): string;
1879
+ truncatedTo(unit: TemporalUnit): ZonedDateTime;
1880
+ until(endExclusive: Temporal, unit: TemporalUnit): number;
1881
+ with(adjuster: TemporalAdjuster): ZonedDateTime;
1882
+ with(field: TemporalField, newValue: number): ZonedDateTime;
1883
+ withDayOfMonth(dayOfMonth: number): ZonedDateTime;
1884
+ withDayOfYear(dayOfYear: number): ZonedDateTime;
1885
+ /**
1886
+ * Returns a copy of this date-time changing the zone offset to the earlier of the two valid
1887
+ * offsets at a local time-line overlap.
1888
+ *
1889
+ * This method only has any effect when the local time-line overlaps, such as at an autumn
1890
+ * daylight savings cutover. In this scenario, there are two valid offsets for the local
1891
+ * date-time. Calling this method will return a zoned date-time with the earlier of the two
1892
+ * selected.
1893
+ *
1894
+ * If this method is called when it is not an overlap, `this` is returned.
1895
+ */
1896
+ withEarlierOffsetAtOverlap(): ZonedDateTime;
1897
+ /**
1898
+ * Returns a copy of this date-time with the zone ID set to the offset.
1899
+ *
1900
+ * This returns a zoned date-time where the zone ID is the same as `offset()`. The local
1901
+ * date-time, offset and instant of the result will be the same as in this date-time.
1902
+ *
1903
+ * Setting the date-time to a fixed single offset means that any future calculations, such as
1904
+ * addition or subtraction, have no complex edge cases due to time-zone rules. This might also
1905
+ * be useful when sending a zoned date-time across a network, as most protocols, such as
1906
+ * ISO-8601, only handle offsets, and not region-based zone IDs.
1907
+ */
1908
+ withFixedOffsetZone(): ZonedDateTime;
1909
+ withHour(hour: number): ZonedDateTime;
1910
+ /**
1911
+ * Returns a copy of this date-time changing the zone offset to the later of the two valid
1912
+ * offsets at a local time-line overlap.
1913
+ *
1914
+ * This method only has any effect when the local time-line overlaps, such as at an autumn
1915
+ * daylight savings cutover. In this scenario, there are two valid offsets for the local
1916
+ * date-time. Calling this method will return a zoned date-time with the later of the two
1917
+ * selected.
1918
+ *
1919
+ * If this method is called when it is not an overlap, `this` is returned.
1920
+ */
1921
+ withLaterOffsetAtOverlap(): ZonedDateTime;
1922
+ withMinute(minute: number): ZonedDateTime;
1923
+ withMonth(month: number): ZonedDateTime;
1924
+ withNano(nanoOfSecond: number): ZonedDateTime;
1925
+ withSecond(second: number): ZonedDateTime;
1926
+ withYear(year: number): ZonedDateTime;
1927
+ /**
1928
+ * Returns a copy of this date-time with a different time-zone, retaining the instant.
1929
+ *
1930
+ * This method changes the time-zone and retains the instant. This normally results in a
1931
+ * change to the local date-time.
1932
+ *
1933
+ * This method is based on retaining the same instant, thus gaps and overlaps in the local
1934
+ * time-line have no effect on the result.
1935
+ *
1936
+ * To change the offset while keeping the local time, use `withZoneSameLocal(ZoneId)`.
1937
+ */
1938
+ withZoneSameInstant(zone: ZoneId): ZonedDateTime;
1939
+ /**
1940
+ * Returns a copy of this date-time with a different time-zone, retaining the local date-time
1941
+ * if possible.
1942
+ *
1943
+ * This method changes the time-zone and retains the local date-time. The local date-time is
1944
+ * only changed if it is invalid for the new zone, determined using the same approach as
1945
+ * `ofLocal(LocalDateTime, ZoneId, ZoneOffset)`.
1946
+ *
1947
+ * To change the zone and adjust the local date-time, use `withZoneSameInstant(ZoneId)`.
1948
+ */
1949
+ withZoneSameLocal(zone: ZoneId): ZonedDateTime;
1950
+ year(): number;
1951
+ zone(): ZoneId;
1952
+ }
1953
+
1954
+ export abstract class ZoneId {
1955
+ static SYSTEM: ZoneId;
1956
+ static UTC: ZoneId;
1957
+
1958
+ static systemDefault(): ZoneId;
1959
+ static of(zoneId: string): ZoneId;
1960
+ static ofOffset(prefix: string, offset: ZoneOffset): ZoneId;
1961
+ static from(temporal: TemporalAccessor): ZoneId;
1962
+
1963
+ static getAvailableZoneIds(): string[];
1964
+
1965
+ equals(other: any): boolean;
1966
+ hashCode(): number;
1967
+ abstract id(): string;
1968
+ normalized(): ZoneId;
1969
+ abstract rules(): ZoneRules;
1970
+ toJSON(): string;
1971
+ toString(): string;
1972
+ }
1973
+
1974
+ export class ZoneOffset extends ZoneId implements TemporalAdjuster {
1975
+ static MAX_SECONDS: ZoneOffset;
1976
+ static UTC: ZoneOffset;
1977
+ static MIN: ZoneOffset;
1978
+ static MAX: ZoneOffset;
1979
+
1980
+ static of(offsetId: string): ZoneOffset;
1981
+ static ofHours(hours: number): ZoneOffset;
1982
+ static ofHoursMinutes(hours: number, minutes: number): ZoneOffset;
1983
+ static ofHoursMinutesSeconds(hours: number, minutes: number, seconds: number): ZoneOffset;
1984
+ static ofTotalMinutes(totalMinutes: number): ZoneOffset;
1985
+ static ofTotalSeconds(totalSeconds: number): ZoneOffset;
1986
+
1987
+ private constructor();
1988
+
1989
+ adjustInto(temporal: Temporal): Temporal;
1990
+ compareTo(other: ZoneOffset): number;
1991
+ equals(other: any): boolean;
1992
+ get(field: TemporalField): number;
1993
+ getLong(field: TemporalField): number;
1994
+ hashCode(): number;
1995
+ id(): string;
1996
+ rules(): ZoneRules;
1997
+ toString(): string;
1998
+ totalSeconds(): number;
1999
+ }
2000
+
2001
+ export class ZoneRegion extends ZoneId {
2002
+ static ofId(zoneId: string): ZoneId;
2003
+
2004
+ private constructor();
2005
+
2006
+ id(): string;
2007
+ rules(): ZoneRules;
2008
+ }
2009
+
2010
+ export class DayOfWeek extends TemporalAccessor implements TemporalAdjuster {
2011
+ static MONDAY: DayOfWeek;
2012
+ static TUESDAY: DayOfWeek;
2013
+ static WEDNESDAY: DayOfWeek;
2014
+ static THURSDAY: DayOfWeek;
2015
+ static FRIDAY: DayOfWeek;
2016
+ static SATURDAY: DayOfWeek;
2017
+ static SUNDAY: DayOfWeek;
2018
+
2019
+ static FROM: TemporalQuery<DayOfWeek>;
2020
+
2021
+ static from(temporal: TemporalAccessor): DayOfWeek;
2022
+ static of(dayOfWeek: number): DayOfWeek;
2023
+ static valueOf(name: string): DayOfWeek;
2024
+ static values(): DayOfWeek[];
2025
+
2026
+ private constructor();
2027
+
2028
+ adjustInto(temporal: Temporal): Temporal;
2029
+ compareTo(other: DayOfWeek): number;
2030
+ equals(other: any): boolean;
2031
+ displayName(style: TextStyle, locale: Locale): string;
2032
+ getLong(field: TemporalField): number;
2033
+ isSupported(field: TemporalField): boolean;
2034
+ minus(days: number): DayOfWeek;
2035
+ name(): string;
2036
+ ordinal(): number;
2037
+ plus(days: number): DayOfWeek;
2038
+ toJSON(): string;
2039
+ toString(): string;
2040
+ value(): number;
2041
+ }
2042
+
2043
+ export class Month extends TemporalAccessor implements TemporalAdjuster {
2044
+ static JANUARY: Month;
2045
+ static FEBRUARY: Month;
2046
+ static MARCH: Month;
2047
+ static APRIL: Month;
2048
+ static MAY: Month;
2049
+ static JUNE: Month;
2050
+ static JULY: Month;
2051
+ static AUGUST: Month;
2052
+ static SEPTEMBER: Month;
2053
+ static OCTOBER: Month;
2054
+ static NOVEMBER: Month;
2055
+ static DECEMBER: Month;
2056
+
2057
+ static from(temporal: TemporalAccessor): Month;
2058
+ static of(month: number): Month;
2059
+ static valueOf(name: string): Month;
2060
+ static values(): Month[];
2061
+
2062
+ private constructor();
2063
+
2064
+ adjustInto(temporal: Temporal): Temporal;
2065
+ compareTo(other: Month): number;
2066
+ equals(other: any): boolean;
2067
+ firstDayOfYear(leapYear: boolean): number;
2068
+ firstMonthOfQuarter(): Month;
2069
+ displayName(style: TextStyle, locale: Locale): string;
2070
+ getLong(field: TemporalField): number;
2071
+ isSupported(field: TemporalField): boolean;
2072
+ length(leapYear: boolean): number;
2073
+ maxLength(): number;
2074
+ minLength(): number;
2075
+ minus(months: number): Month;
2076
+ name(): string;
2077
+ ordinal(): number;
2078
+ plus(months: number): Month;
2079
+ toJSON(): string;
2080
+ toString(): string;
2081
+ value(): number;
2082
+ }
2083
+
2084
+ // ----------------------------------------------------------------------------
2085
+ // FORMAT
2086
+ // ----------------------------------------------------------------------------
2087
+
2088
+ export class DateTimeFormatter {
2089
+ static ISO_LOCAL_DATE: DateTimeFormatter;
2090
+ static ISO_LOCAL_TIME: DateTimeFormatter;
2091
+ static ISO_LOCAL_DATE_TIME: DateTimeFormatter;
2092
+ static ISO_INSTANT: DateTimeFormatter;
2093
+ static ISO_OFFSET_DATE_TIME: DateTimeFormatter;
2094
+ static ISO_ZONED_DATE_TIME: DateTimeFormatter;
2095
+
2096
+ static ofPattern(pattern: string): DateTimeFormatter;
2097
+ static parsedExcessDays(): TemporalQuery<Period>;
2098
+ static parsedLeapSecond(): TemporalQuery<boolean>;
2099
+
2100
+ private constructor();
2101
+
2102
+ chronology(): Chronology | null;
2103
+ decimalStyle(): DecimalStyle;
2104
+ format(temporal: TemporalAccessor): string;
2105
+ locale(): any;
2106
+ parse(text: string): TemporalAccessor;
2107
+ parse<T>(text: string, query: TemporalQuery<T>): T;
2108
+ parseUnresolved(text: string, position: ParsePosition): TemporalAccessor;
2109
+ toString(): string;
2110
+ withChronology(chrono: Chronology): DateTimeFormatter;
2111
+ withLocale(locale: Locale): DateTimeFormatter;
2112
+ withResolverStyle(resolverStyle: ResolverStyle): DateTimeFormatter;
2113
+ }
2114
+
2115
+ export class DateTimeFormatterBuilder {
2116
+ constructor();
2117
+
2118
+ append(formatter: DateTimeFormatter): DateTimeFormatterBuilder;
2119
+ appendFraction(field: TemporalField, minWidth: number, maxWidth: number, decimalPoint: boolean): DateTimeFormatterBuilder;
2120
+ appendInstant(fractionalDigits: number): DateTimeFormatterBuilder;
2121
+ appendLiteral(literal: any): DateTimeFormatterBuilder;
2122
+ appendOffset(pattern: string, noOffsetText: string): DateTimeFormatterBuilder;
2123
+ appendOffsetId(): DateTimeFormatterBuilder;
2124
+ appendPattern(pattern: string): DateTimeFormatterBuilder;
2125
+ appendValue(field: TemporalField, width?: number, maxWidth?: number, signStyle?: SignStyle): DateTimeFormatterBuilder;
2126
+ appendValueReduced(field: TemporalField, width: number, maxWidth: number, base: ChronoLocalDate | number): DateTimeFormatterBuilder;
2127
+ appendZoneId(): DateTimeFormatterBuilder;
2128
+ optionalEnd(): DateTimeFormatterBuilder;
2129
+ optionalStart(): DateTimeFormatterBuilder;
2130
+ padNext(): DateTimeFormatterBuilder;
2131
+ parseCaseInsensitive(): DateTimeFormatterBuilder;
2132
+ parseCaseSensitive(): DateTimeFormatterBuilder;
2133
+ parseLenient(): DateTimeFormatterBuilder;
2134
+ parseStrict(): DateTimeFormatterBuilder;
2135
+ toFormatter(resolverStyle?: ResolverStyle): DateTimeFormatter;
2136
+ }
2137
+
2138
+ export class DecimalStyle {
2139
+ private constructor();
2140
+
2141
+ decimalSeparator(): string;
2142
+ equals(other: any): boolean;
2143
+ hashCode(): any;
2144
+ negativeSign(): string;
2145
+ positiveSign(): string;
2146
+ toString(): string;
2147
+ zeroDigit(): string;
2148
+ }
2149
+
2150
+ export class ResolverStyle {
2151
+ static STRICT: ResolverStyle;
2152
+ static SMART: ResolverStyle;
2153
+ static LENIENT: ResolverStyle;
2154
+
2155
+ private constructor();
2156
+
2157
+ equals(other: any): boolean;
2158
+ toJSON(): string;
2159
+ toString(): string;
2160
+ }
2161
+
2162
+ export class SignStyle {
2163
+ static NORMAL: SignStyle;
2164
+ static NEVER: SignStyle;
2165
+ static ALWAYS: SignStyle;
2166
+ static EXCEEDS_PAD: SignStyle;
2167
+ static NOT_NEGATIVE: SignStyle;
2168
+
2169
+ private constructor();
2170
+
2171
+ equals(other: any): boolean;
2172
+ toJSON(): string;
2173
+ toString(): string;
2174
+ }
2175
+
2176
+ export class TextStyle {
2177
+ static FULL: TextStyle;
2178
+ static FULL_STANDALONE: TextStyle;
2179
+ static SHORT: TextStyle;
2180
+ static SHORT_STANDALONE: TextStyle;
2181
+ static NARROW: TextStyle;
2182
+ static NARROW_STANDALONE: TextStyle;
2183
+
2184
+ private constructor();
2185
+
2186
+ asNormal(): TextStyle;
2187
+ asStandalone(): TextStyle;
2188
+ isStandalone(): boolean;
2189
+
2190
+ equals(other: any): boolean;
2191
+ toJSON(): string;
2192
+ toString(): string;
2193
+ }
2194
+
2195
+ export class ParsePosition {
2196
+ constructor(index: number);
2197
+
2198
+ getIndex(): number;
2199
+ setIndex(index: number): void;
2200
+ getErrorIndex(): number;
2201
+ setErrorIndex(errorIndex: number): void;
2202
+ }
2203
+
2204
+ // ----------------------------------------------------------------------------
2205
+ // ZONE
2206
+ // ----------------------------------------------------------------------------
2207
+
2208
+ export class ZoneOffsetTransition {
2209
+ static of(transition: LocalDateTime, offsetBefore: ZoneOffset, offsetAfter: ZoneOffset): ZoneOffsetTransition;
2210
+
2211
+ private constructor();
2212
+
2213
+ compareTo(transition: ZoneOffsetTransition): number;
2214
+ dateTimeAfter(): LocalDateTime;
2215
+ dateTimeBefore(): LocalDateTime;
2216
+ duration(): Duration;
2217
+ durationSeconds(): number;
2218
+ equals(other: any): boolean;
2219
+ hashCode(): number;
2220
+ instant(): Instant;
2221
+ isGap(): boolean;
2222
+ isOverlap(): boolean;
2223
+ isValidOffset(offset: ZoneOffset): boolean;
2224
+ offsetAfter(): ZoneOffset;
2225
+ offsetBefore(): ZoneOffset;
2226
+ toEpochSecond(): number;
2227
+ toString(): string;
2228
+ validOffsets(): ZoneOffset[];
2229
+ }
2230
+
2231
+ export interface ZoneOffsetTransitionRule {
2232
+ // TODO: Not implemented yet
2233
+ }
2234
+
2235
+ export abstract class ZoneRules {
2236
+ static of(offest: ZoneOffset): ZoneRules;
2237
+
2238
+ /**
2239
+ * Gets the offset applicable at the specified instant in these rules.
2240
+ *
2241
+ * The mapping from an instant to an offset is simple, there is only one valid offset
2242
+ * for each instant. This method returns that offset.
2243
+ */
2244
+ offset(instant: Instant): ZoneOffset;
2245
+ /**
2246
+ * Gets a suitable offset for the specified local date-time in these rules.
2247
+ *
2248
+ * The mapping from a local date-time to an offset is not straightforward. There are
2249
+ * three cases:
2250
+ * - Normal, with one valid offset. For the vast majority of the year, the normal case
2251
+ * applies, where there is a single valid offset for the local date-time.
2252
+ * - Gap, with zero valid offsets. This is when clocks jump forward typically due to the
2253
+ * spring daylight savings change from "winter" to "summer". In a gap there are local
2254
+ * date-time values with no valid offset.
2255
+ * - Overlap, with two valid offsets. This is when clocks are set back typically due to
2256
+ * the autumn daylight savings change from "summer" to "winter". In an overlap there are
2257
+ * local date-time values with two valid offsets.
2258
+ *
2259
+ * Thus, for any given local date-time there can be zero, one or two valid offsets. This
2260
+ * method returns the single offset in the Normal case, and in the Gap or Overlap case it
2261
+ * returns the offset before the transition.
2262
+ *
2263
+ * Since, in the case of Gap and Overlap, the offset returned is a "best" value, rather
2264
+ * than the "correct" value, it should be treated with care. Applications that care about
2265
+ * the correct offset should use a combination of this method, `getValidOffsets` and
2266
+ * `getTransition`.
2267
+ */
2268
+ offset(localDateTime: LocalDateTime): ZoneOffset;
2269
+ toJSON(): string;
2270
+ abstract daylightSavings(instant: Instant): Duration;
2271
+ abstract isDaylightSavings(instant: Instant): boolean;
2272
+ abstract isFixedOffset(): boolean;
2273
+ /**
2274
+ * Checks if the offset date-time is valid for these rules.
2275
+ *
2276
+ * To be valid, the local date-time must not be in a gap and the offset must match the
2277
+ * valid offsets.
2278
+ */
2279
+ abstract isValidOffset(localDateTime: LocalDateTime, offset: ZoneOffset): boolean;
2280
+ abstract nextTransition(instant: Instant): ZoneOffsetTransition;
2281
+ abstract offsetOfEpochMilli(epochMilli: number): ZoneOffset;
2282
+ abstract offsetOfInstant(instant: Instant): ZoneOffset;
2283
+ abstract offsetOfLocalDateTime(localDateTime: LocalDateTime): ZoneOffset;
2284
+ abstract previousTransition(instant: Instant): ZoneOffsetTransition;
2285
+ abstract standardOffset(instant: Instant): ZoneOffset;
2286
+ abstract toString(): string;
2287
+ /**
2288
+ * Gets the offset transition applicable at the specified local date-time in these rules.
2289
+ *
2290
+ * The mapping from a local date-time to an offset is not straightforward. There are
2291
+ * three cases:
2292
+ * - Normal, with one valid offset. For the vast majority of the year, the normal case
2293
+ * applies, where there is a single valid offset for the local date-time.
2294
+ * - Gap, with zero valid offsets. This is when clocks jump forward typically due to the
2295
+ * spring daylight savings change from "winter" to "summer". In a gap there are local
2296
+ * date-time values with no valid offset.
2297
+ * - Overlap, with two valid offsets. This is when clocks are set back typically due to
2298
+ * the autumn daylight savings change from "summer" to "winter". In an overlap there are
2299
+ * local date-time values with two valid offsets.
2300
+ *
2301
+ * A transition is used to model the cases of a Gap or Overlap. The Normal case will return
2302
+ * `null`.
2303
+ *
2304
+ * There are various ways to handle the conversion from a `LocalDateTime`. One technique,
2305
+ * using this method, would be:
2306
+ * ```
2307
+ * const trans = rules.transition(localDT);
2308
+ * if (trans === null) {
2309
+ * // Gap or Overlap: determine what to do from transition
2310
+ * } else {
2311
+ * // Normal case: only one valid offset
2312
+ * zoneOffset = rules.offset(localDT);
2313
+ * }
2314
+ * ```
2315
+ *
2316
+ * @returns the offset transition, `null` if the local date-time is not in transition.
2317
+ */
2318
+ abstract transition(localDateTime: LocalDateTime): ZoneOffsetTransition;
2319
+ abstract transitionRules(): ZoneOffsetTransitionRule[];
2320
+ abstract transitions(): ZoneOffsetTransition[];
2321
+ /**
2322
+ * Gets the offset applicable at the specified local date-time in these rules.
2323
+ *
2324
+ * The mapping from a local date-time to an offset is not straightforward. There are
2325
+ * three cases:
2326
+ * - Normal, with one valid offset. For the vast majority of the year, the normal case
2327
+ * applies, where there is a single valid offset for the local date-time.
2328
+ * - Gap, with zero valid offsets. This is when clocks jump forward typically due to the
2329
+ * spring daylight savings change from "winter" to "summer". In a gap there are local
2330
+ * date-time values with no valid offset.
2331
+ * - Overlap, with two valid offsets. This is when clocks are set back typically due to
2332
+ * the autumn daylight savings change from "summer" to "winter". In an overlap there are
2333
+ * local date-time values with two valid offsets.
2334
+ *
2335
+ * Thus, for any given local date-time there can be zero, one or two valid offsets. This
2336
+ * method returns that list of valid offsets, which is a list of size 0, 1 or 2. In the
2337
+ * case where there are two offsets, the earlier offset is returned at index 0 and the
2338
+ * later offset at index 1.
2339
+ *
2340
+ * There are various ways to handle the conversion from a `LocalDateTime`. One technique,
2341
+ * using this method, would be:
2342
+ * ```
2343
+ * const validOffsets = rules.getOffset(localDT);
2344
+ * if (validOffsets.length === 1) {
2345
+ * // Normal case: only one valid offset
2346
+ * zoneOffset = validOffsets[0];
2347
+ * } else {
2348
+ * // Gap or Overlap: determine what to do from transition
2349
+ * const trans = rules.transition(localDT);
2350
+ * }
2351
+ * ```
2352
+ *
2353
+ * In theory, it is possible for there to be more than two valid offsets. This would happen
2354
+ * if clocks to be put back more than once in quick succession. This has never happened in
2355
+ * the history of time-zones and thus has no special handling. However, if it were to
2356
+ * happen, then the list would return more than 2 entries.
2357
+ */
2358
+ abstract validOffsets(localDateTime: LocalDateTime): ZoneOffset[];
2359
+ }
2360
+
2361
+ export class ZoneRulesProvider {
2362
+ static getRules(zoneId: string): ZoneRules;
2363
+ static getAvailableZoneIds(): string[];
2364
+ }
2365
+
2366
+ // ----------------------------------------------------------------------------
2367
+ // CHRONO
2368
+ // ----------------------------------------------------------------------------
2369
+
2370
+ // TODO: js-joda doesn't have Chronology yet. Methods like `LocalDate.chronology()`
2371
+ // actually return an `IsoChronology` so Chronology is an alias type of that class
2372
+ // for now. Change this if Chronology is added.
2373
+ export type Chronology = IsoChronology;
2374
+
2375
+ export abstract class IsoChronology {
2376
+ static isLeapYear(prolepticYear: number): boolean;
2377
+
2378
+ private constructor();
2379
+
2380
+ equals(other: any): boolean;
2381
+ resolveDate(fieldValues: any, resolverStyle: any): any;
2382
+ toString(): string;
2383
+ }
2384
+
2385
+ export abstract class ChronoLocalDate extends Temporal implements TemporalAdjuster {
2386
+ adjustInto(temporal: Temporal): Temporal;
2387
+ format(formatter: DateTimeFormatter): string;
2388
+ isSupported(fieldOrUnit: TemporalField | TemporalUnit): boolean;
2389
+ }
2390
+
2391
+ export abstract class ChronoLocalDateTime extends Temporal implements TemporalAdjuster {
2392
+ adjustInto(temporal: Temporal): Temporal;
2393
+ chronology(): Chronology;
2394
+ toEpochSecond(offset: ZoneOffset): number;
2395
+ toInstant(offset: ZoneOffset): Instant;
2396
+ }
2397
+
2398
+ export abstract class ChronoZonedDateTime extends Temporal {
2399
+ compareTo(other: ChronoZonedDateTime): number;
2400
+ equals(other: any): boolean;
2401
+ format(formatter: DateTimeFormatter): string;
2402
+ isAfter(other: ChronoZonedDateTime): boolean;
2403
+ isBefore(other: ChronoZonedDateTime): boolean;
2404
+ isEqual(other: ChronoZonedDateTime): boolean;
2405
+ toEpochSecond(): number;
2406
+ toInstant(): Instant;
2407
+ }
2408
+
2409
+ // ----------------------------------------------------------------------------
2410
+ // SUPPORT
2411
+ // ----------------------------------------------------------------------------
2412
+
2413
+ export interface Locale {
2414
+ // TODO: Not implemented yet
2415
+ }
2416
+
2417
+ export function nativeJs(date: Date | any, zone?: ZoneId): TemporalAccessor;
2418
+
2419
+ export function convert(
2420
+ temporal: LocalDate | LocalDateTime | ZonedDateTime,
2421
+ zone?: ZoneId,
2422
+ ): {
2423
+ toDate: () => Date;
2424
+ toEpochMilli: () => number;
2425
+ };
2426
+
2427
+ export function use(plugin: Function): any;
2428
+
2429
+ // ----------------------------------------------------------------------------
2430
+ // EXCEPTIONS
2431
+ // ----------------------------------------------------------------------------
2432
+
2433
+ export class DateTimeException extends Error {
2434
+ constructor(message?: string, cause?: Error);
2435
+ }
2436
+
2437
+ export class UnsupportedTemporalTypeException extends DateTimeException { }
2438
+
2439
+ export class DateTimeParseException extends Error {
2440
+ constructor(message?: string, text?: string, index?: number, cause?: Error);
2441
+
2442
+ parsedString(): string;
2443
+ errorIndex(): number;
2444
+ }
2445
+
2446
+ export class ArithmeticException extends Error { }
2447
+ export class IllegalArgumentException extends Error { }
2448
+ export class IllegalStateException extends Error { }
2449
+ export class NullPointerException extends Error { }
2450
+
2451
+ export const __esModule: true;
2452
+ export as namespace JSJoda;