@rvoh/dream 2.3.0-alpha.5 → 2.3.0-alpha.7

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 (305) hide show
  1. package/dist/cjs/src/Dream.js +2 -40
  2. package/dist/cjs/src/cli/index.js +4 -0
  3. package/dist/cjs/src/dream/Query.js +14 -11
  4. package/dist/cjs/src/dream/QueryDriver/Base.js +0 -14
  5. package/dist/cjs/src/dream/QueryDriver/Kysely.js +86 -74
  6. package/dist/cjs/src/dream/QueryDriver/Postgres.js +10 -2
  7. package/dist/cjs/src/dream/internal/extractAssignableAssociationAttributes.js +9 -0
  8. package/dist/cjs/src/errors/db/DataIncompatibleWithDatabaseField.js +1 -3
  9. package/dist/cjs/src/helpers/areEqual.js +5 -0
  10. package/dist/cjs/src/helpers/cli/ASTBuilder.js +54 -2
  11. package/dist/cjs/src/helpers/cli/ASTKyselyCodegenEnhancer.js +84 -0
  12. package/dist/cjs/src/helpers/cli/ASTSchemaBuilder.js +17 -1
  13. package/dist/cjs/src/helpers/cli/generateFactoryContent.js +16 -0
  14. package/dist/cjs/src/helpers/cloneDeepSafe.js +21 -10
  15. package/dist/cjs/src/helpers/customPgParsers.js +18 -1
  16. package/dist/cjs/src/helpers/db/normalizeDataForDb.js +81 -0
  17. package/dist/cjs/src/helpers/db/types/helpers.js +5 -0
  18. package/dist/cjs/src/helpers/db/types/isDatetimeOrDatetimeArrayColumn.js +2 -1
  19. package/dist/cjs/src/helpers/sortBy.js +7 -5
  20. package/dist/cjs/src/helpers/sqlAttributes.js +4 -53
  21. package/dist/cjs/src/helpers/stringCasing.js +6 -5
  22. package/dist/cjs/src/helpers/toSafeObject.js +17 -0
  23. package/dist/cjs/src/package-exports/errors.js +2 -0
  24. package/dist/cjs/src/package-exports/index.js +2 -0
  25. package/dist/cjs/src/serializer/SerializerRenderer.js +11 -11
  26. package/dist/cjs/src/types/clocktime.js +1 -0
  27. package/dist/cjs/src/utils/datetime/BaseClockTime.js +363 -0
  28. package/dist/cjs/src/utils/datetime/CalendarDate.js +110 -119
  29. package/dist/cjs/src/utils/datetime/ClockTime.js +173 -0
  30. package/dist/cjs/src/utils/datetime/ClockTimeTz.js +232 -0
  31. package/dist/cjs/src/utils/datetime/DateTime.js +327 -221
  32. package/dist/cjs/src/utils/datetime/helpers/isoTimeDecimalString.js +8 -4
  33. package/dist/cjs/src/utils/datetime/helpers/replaceISOMicroseconds.js +4 -1
  34. package/dist/esm/src/Dream.js +2 -40
  35. package/dist/esm/src/cli/index.js +4 -0
  36. package/dist/esm/src/dream/Query.js +14 -11
  37. package/dist/esm/src/dream/QueryDriver/Base.js +0 -14
  38. package/dist/esm/src/dream/QueryDriver/Kysely.js +86 -74
  39. package/dist/esm/src/dream/QueryDriver/Postgres.js +10 -2
  40. package/dist/esm/src/dream/internal/extractAssignableAssociationAttributes.js +9 -0
  41. package/dist/esm/src/errors/db/DataIncompatibleWithDatabaseField.js +1 -3
  42. package/dist/esm/src/helpers/areEqual.js +5 -0
  43. package/dist/esm/src/helpers/cli/ASTBuilder.js +54 -2
  44. package/dist/esm/src/helpers/cli/ASTKyselyCodegenEnhancer.js +84 -0
  45. package/dist/esm/src/helpers/cli/ASTSchemaBuilder.js +17 -1
  46. package/dist/esm/src/helpers/cli/generateFactoryContent.js +16 -0
  47. package/dist/esm/src/helpers/cloneDeepSafe.js +21 -10
  48. package/dist/esm/src/helpers/customPgParsers.js +18 -1
  49. package/dist/esm/src/helpers/db/normalizeDataForDb.js +81 -0
  50. package/dist/esm/src/helpers/db/types/helpers.js +5 -0
  51. package/dist/esm/src/helpers/db/types/isDatetimeOrDatetimeArrayColumn.js +2 -1
  52. package/dist/esm/src/helpers/sortBy.js +7 -5
  53. package/dist/esm/src/helpers/sqlAttributes.js +4 -53
  54. package/dist/esm/src/helpers/stringCasing.js +6 -5
  55. package/dist/esm/src/helpers/toSafeObject.js +17 -0
  56. package/dist/esm/src/package-exports/errors.js +2 -0
  57. package/dist/esm/src/package-exports/index.js +2 -0
  58. package/dist/esm/src/serializer/SerializerRenderer.js +11 -11
  59. package/dist/esm/src/types/clocktime.js +1 -0
  60. package/dist/esm/src/utils/datetime/BaseClockTime.js +363 -0
  61. package/dist/esm/src/utils/datetime/CalendarDate.js +110 -119
  62. package/dist/esm/src/utils/datetime/ClockTime.js +173 -0
  63. package/dist/esm/src/utils/datetime/ClockTimeTz.js +232 -0
  64. package/dist/esm/src/utils/datetime/DateTime.js +327 -221
  65. package/dist/esm/src/utils/datetime/helpers/isoTimeDecimalString.js +8 -4
  66. package/dist/esm/src/utils/datetime/helpers/replaceISOMicroseconds.js +4 -1
  67. package/dist/types/src/Dream.d.ts +29 -33
  68. package/dist/types/src/dream/DreamClassTransactionBuilder.d.ts +9 -10
  69. package/dist/types/src/dream/DreamInstanceTransactionBuilder.d.ts +16 -16
  70. package/dist/types/src/dream/LeftJoinLoadBuilder.d.ts +1 -1
  71. package/dist/types/src/dream/LoadBuilder.d.ts +1 -1
  72. package/dist/types/src/dream/Query.d.ts +16 -16
  73. package/dist/types/src/dream/QueryDriver/Base.d.ts +0 -1
  74. package/dist/types/src/dream/QueryDriver/Kysely.d.ts +1 -0
  75. package/dist/types/src/dream/internal/associations/associationQuery.d.ts +1 -1
  76. package/dist/types/src/dream/internal/associations/associationUpdateQuery.d.ts +1 -1
  77. package/dist/types/src/dream/internal/associations/destroyAssociation.d.ts +1 -1
  78. package/dist/types/src/dream/internal/associations/throughAssociationHasOptionsBesidesThroughAndSource.d.ts +4 -2
  79. package/dist/types/src/dream/internal/associations/undestroyAssociation.d.ts +1 -1
  80. package/dist/types/src/dream/internal/extractAssignableAssociationAttributes.d.ts +3 -0
  81. package/dist/types/src/dream/internal/similarity/SimilarityBuilder.d.ts +7 -7
  82. package/dist/types/src/errors/db/DataIncompatibleWithDatabaseField.d.ts +2 -7
  83. package/dist/types/src/helpers/cli/ASTBuilder.d.ts +31 -0
  84. package/dist/types/src/helpers/cli/ASTKyselyCodegenEnhancer.d.ts +13 -0
  85. package/dist/types/src/helpers/customPgParsers.d.ts +5 -0
  86. package/dist/types/src/helpers/db/normalizeDataForDb.d.ts +6 -0
  87. package/dist/types/src/helpers/db/types/helpers.d.ts +5 -0
  88. package/dist/types/src/helpers/sort.d.ts +2 -1
  89. package/dist/types/src/helpers/sortBy.d.ts +3 -0
  90. package/dist/types/src/helpers/toSafeObject.d.ts +8 -0
  91. package/dist/types/src/package-exports/errors.d.ts +2 -0
  92. package/dist/types/src/package-exports/index.d.ts +2 -0
  93. package/dist/types/src/package-exports/types.d.ts +2 -1
  94. package/dist/types/src/types/associations/shared.d.ts +15 -13
  95. package/dist/types/src/types/associations/shared.ts +81 -41
  96. package/dist/types/src/types/calendardate.d.ts +22 -1
  97. package/dist/types/src/types/calendardate.ts +33 -1
  98. package/dist/types/src/types/clocktime.d.ts +22 -0
  99. package/dist/types/src/types/clocktime.ts +59 -0
  100. package/dist/types/src/types/datetime.d.ts +13 -18
  101. package/dist/types/src/types/datetime.ts +18 -21
  102. package/dist/types/src/types/dream.d.ts +27 -13
  103. package/dist/types/src/types/dream.ts +40 -14
  104. package/dist/types/src/types/variadic.d.ts +10 -9
  105. package/dist/types/src/types/variadic.ts +30 -5
  106. package/dist/types/src/utils/datetime/BaseClockTime.d.ts +287 -0
  107. package/dist/types/src/utils/datetime/CalendarDate.d.ts +65 -47
  108. package/dist/types/src/utils/datetime/ClockTime.d.ts +138 -0
  109. package/dist/types/src/utils/datetime/ClockTimeTz.d.ts +194 -0
  110. package/dist/types/src/utils/datetime/DateTime.d.ts +169 -66
  111. package/dist/types/src/utils/datetime/helpers/isoTimeDecimalString.d.ts +3 -2
  112. package/dist/types/src/utils/datetime/helpers/replaceISOMicroseconds.d.ts +4 -2
  113. package/docs/assets/navigation.js +1 -1
  114. package/docs/assets/search.js +1 -1
  115. package/docs/classes/db.DreamMigrationHelpers.html +9 -9
  116. package/docs/classes/db.KyselyQueryDriver.html +33 -34
  117. package/docs/classes/db.PostgresQueryDriver.html +34 -35
  118. package/docs/classes/db.QueryDriverBase.html +32 -33
  119. package/docs/classes/errors.CheckConstraintViolation.html +4 -6
  120. package/docs/classes/errors.ColumnOverflow.html +4 -6
  121. package/docs/classes/errors.CreateOrFindByFailedToCreateAndFind.html +3 -3
  122. package/docs/classes/errors.DataIncompatibleWithDatabaseField.html +4 -6
  123. package/docs/classes/errors.DataTypeColumnTypeMismatch.html +4 -6
  124. package/docs/classes/errors.GlobalNameNotSet.html +3 -3
  125. package/docs/classes/errors.InvalidCalendarDate.html +2 -2
  126. package/docs/classes/errors.InvalidClockTime.html +17 -0
  127. package/docs/classes/errors.InvalidClockTimeTz.html +17 -0
  128. package/docs/classes/errors.InvalidDateTime.html +2 -2
  129. package/docs/classes/errors.MissingSerializersDefinition.html +3 -3
  130. package/docs/classes/errors.NonLoadedAssociation.html +3 -3
  131. package/docs/classes/errors.NotNullViolation.html +4 -6
  132. package/docs/classes/errors.RecordNotFound.html +3 -3
  133. package/docs/classes/errors.ValidationError.html +3 -3
  134. package/docs/classes/index.CalendarDate.html +80 -92
  135. package/docs/classes/index.ClockTime.html +232 -0
  136. package/docs/classes/index.ClockTimeTz.html +253 -0
  137. package/docs/classes/index.DateTime.html +176 -173
  138. package/docs/classes/index.Decorators.html +19 -19
  139. package/docs/classes/index.Dream.html +127 -127
  140. package/docs/classes/index.DreamApp.html +5 -5
  141. package/docs/classes/index.DreamTransaction.html +2 -2
  142. package/docs/classes/index.Env.html +2 -2
  143. package/docs/classes/index.Query.html +71 -71
  144. package/docs/classes/system.CliFileWriter.html +2 -2
  145. package/docs/classes/system.DreamBin.html +2 -2
  146. package/docs/classes/system.DreamCLI.html +5 -5
  147. package/docs/classes/system.DreamImporter.html +2 -2
  148. package/docs/classes/system.DreamLogos.html +2 -2
  149. package/docs/classes/system.DreamSerializerBuilder.html +8 -8
  150. package/docs/classes/system.ObjectSerializerBuilder.html +8 -8
  151. package/docs/classes/system.PathHelpers.html +3 -3
  152. package/docs/classes/utils.Encrypt.html +2 -2
  153. package/docs/classes/utils.Range.html +2 -2
  154. package/docs/functions/db.closeAllDbConnections.html +1 -1
  155. package/docs/functions/db.dreamDbConnections.html +1 -1
  156. package/docs/functions/db.untypedDb.html +1 -1
  157. package/docs/functions/db.validateColumn.html +1 -1
  158. package/docs/functions/db.validateTable.html +1 -1
  159. package/docs/functions/errors.pgErrorType.html +1 -1
  160. package/docs/functions/index.DreamSerializer.html +1 -1
  161. package/docs/functions/index.ObjectSerializer.html +1 -1
  162. package/docs/functions/index.ReplicaSafe.html +1 -1
  163. package/docs/functions/index.STI.html +1 -1
  164. package/docs/functions/index.SoftDelete.html +1 -1
  165. package/docs/functions/utils.camelize.html +1 -1
  166. package/docs/functions/utils.capitalize.html +1 -1
  167. package/docs/functions/utils.cloneDeepSafe.html +1 -1
  168. package/docs/functions/utils.compact.html +1 -1
  169. package/docs/functions/utils.groupBy.html +1 -1
  170. package/docs/functions/utils.hyphenize.html +1 -1
  171. package/docs/functions/utils.intersection.html +1 -1
  172. package/docs/functions/utils.isEmpty.html +1 -1
  173. package/docs/functions/utils.normalizeUnicode.html +1 -1
  174. package/docs/functions/utils.pascalize.html +1 -1
  175. package/docs/functions/utils.percent.html +1 -1
  176. package/docs/functions/utils.range-1.html +1 -1
  177. package/docs/functions/utils.round.html +1 -1
  178. package/docs/functions/utils.sanitizeString.html +1 -1
  179. package/docs/functions/utils.snakeify.html +1 -1
  180. package/docs/functions/utils.sort.html +1 -1
  181. package/docs/functions/utils.sortBy.html +1 -1
  182. package/docs/functions/utils.sortObjectByKey.html +1 -1
  183. package/docs/functions/utils.sortObjectByValue.html +1 -1
  184. package/docs/functions/utils.uncapitalize.html +1 -1
  185. package/docs/functions/utils.uniq.html +1 -1
  186. package/docs/interfaces/openapi.OpenapiDescription.html +2 -2
  187. package/docs/interfaces/openapi.OpenapiSchemaProperties.html +1 -1
  188. package/docs/interfaces/openapi.OpenapiSchemaPropertiesShorthand.html +1 -1
  189. package/docs/interfaces/openapi.OpenapiTypeFieldObject.html +1 -1
  190. package/docs/interfaces/types.BelongsToStatement.html +2 -2
  191. package/docs/interfaces/types.DecoratorContext.html +2 -2
  192. package/docs/interfaces/types.DreamAppInitOptions.html +2 -2
  193. package/docs/interfaces/types.DreamAppOpts.html +2 -2
  194. package/docs/interfaces/types.DurationObject.html +5 -5
  195. package/docs/interfaces/types.EncryptOptions.html +2 -2
  196. package/docs/interfaces/types.InternalAnyTypedSerializerRendersMany.html +2 -2
  197. package/docs/interfaces/types.InternalAnyTypedSerializerRendersOne.html +2 -2
  198. package/docs/interfaces/types.SerializerRendererOpts.html +2 -2
  199. package/docs/modules/db.html +1 -1
  200. package/docs/modules/errors.html +3 -1
  201. package/docs/modules/index.html +3 -1
  202. package/docs/modules/openapi.html +1 -1
  203. package/docs/modules/system.html +1 -1
  204. package/docs/modules/types.html +3 -1
  205. package/docs/modules/utils.html +1 -1
  206. package/docs/types/openapi.CommonOpenapiSchemaObjectFields.html +1 -1
  207. package/docs/types/openapi.OpenapiAllTypes.html +1 -1
  208. package/docs/types/openapi.OpenapiFormats.html +1 -1
  209. package/docs/types/openapi.OpenapiNumberFormats.html +1 -1
  210. package/docs/types/openapi.OpenapiPrimitiveBaseTypes.html +1 -1
  211. package/docs/types/openapi.OpenapiPrimitiveTypes.html +1 -1
  212. package/docs/types/openapi.OpenapiSchemaArray.html +1 -1
  213. package/docs/types/openapi.OpenapiSchemaArrayShorthand.html +1 -1
  214. package/docs/types/openapi.OpenapiSchemaBase.html +1 -1
  215. package/docs/types/openapi.OpenapiSchemaBody.html +1 -1
  216. package/docs/types/openapi.OpenapiSchemaBodyShorthand.html +1 -1
  217. package/docs/types/openapi.OpenapiSchemaCommonFields.html +1 -1
  218. package/docs/types/openapi.OpenapiSchemaExpressionAllOf.html +1 -1
  219. package/docs/types/openapi.OpenapiSchemaExpressionAnyOf.html +1 -1
  220. package/docs/types/openapi.OpenapiSchemaExpressionOneOf.html +1 -1
  221. package/docs/types/openapi.OpenapiSchemaExpressionRef.html +1 -1
  222. package/docs/types/openapi.OpenapiSchemaExpressionRefSchemaShorthand.html +1 -1
  223. package/docs/types/openapi.OpenapiSchemaInteger.html +1 -1
  224. package/docs/types/openapi.OpenapiSchemaNull.html +1 -1
  225. package/docs/types/openapi.OpenapiSchemaNumber.html +1 -1
  226. package/docs/types/openapi.OpenapiSchemaObject.html +1 -1
  227. package/docs/types/openapi.OpenapiSchemaObjectAllOf.html +1 -1
  228. package/docs/types/openapi.OpenapiSchemaObjectAllOfShorthand.html +1 -1
  229. package/docs/types/openapi.OpenapiSchemaObjectAnyOf.html +1 -1
  230. package/docs/types/openapi.OpenapiSchemaObjectAnyOfShorthand.html +1 -1
  231. package/docs/types/openapi.OpenapiSchemaObjectBase.html +1 -1
  232. package/docs/types/openapi.OpenapiSchemaObjectBaseShorthand.html +1 -1
  233. package/docs/types/openapi.OpenapiSchemaObjectOneOf.html +1 -1
  234. package/docs/types/openapi.OpenapiSchemaObjectOneOfShorthand.html +1 -1
  235. package/docs/types/openapi.OpenapiSchemaObjectShorthand.html +1 -1
  236. package/docs/types/openapi.OpenapiSchemaPrimitiveGeneric.html +1 -1
  237. package/docs/types/openapi.OpenapiSchemaShorthandExpressionAllOf.html +1 -1
  238. package/docs/types/openapi.OpenapiSchemaShorthandExpressionAnyOf.html +1 -1
  239. package/docs/types/openapi.OpenapiSchemaShorthandExpressionOneOf.html +1 -1
  240. package/docs/types/openapi.OpenapiSchemaShorthandExpressionSerializableRef.html +1 -1
  241. package/docs/types/openapi.OpenapiSchemaShorthandExpressionSerializerRef.html +1 -1
  242. package/docs/types/openapi.OpenapiSchemaShorthandPrimitiveGeneric.html +1 -1
  243. package/docs/types/openapi.OpenapiSchemaString.html +1 -1
  244. package/docs/types/openapi.OpenapiShorthandAllTypes.html +1 -1
  245. package/docs/types/openapi.OpenapiShorthandPrimitiveBaseTypes.html +1 -1
  246. package/docs/types/openapi.OpenapiShorthandPrimitiveTypes.html +1 -1
  247. package/docs/types/openapi.OpenapiTypeField.html +1 -1
  248. package/docs/types/system.DreamAppAllowedPackageManagersEnum.html +1 -1
  249. package/docs/types/types.CalendarDateDurationUnit.html +1 -1
  250. package/docs/types/types.CalendarDateObject.html +2 -0
  251. package/docs/types/types.Camelized.html +1 -1
  252. package/docs/types/types.ClockTimeObject.html +2 -0
  253. package/docs/types/types.DbConnectionType.html +1 -1
  254. package/docs/types/types.DbTypes.html +1 -1
  255. package/docs/types/types.DreamAssociationMetadata.html +1 -1
  256. package/docs/types/types.DreamAttributes.html +1 -1
  257. package/docs/types/types.DreamClassAssociationAndStatement.html +1 -1
  258. package/docs/types/types.DreamClassColumn.html +1 -1
  259. package/docs/types/types.DreamColumn.html +1 -1
  260. package/docs/types/types.DreamColumnNames.html +1 -1
  261. package/docs/types/types.DreamLogLevel.html +1 -1
  262. package/docs/types/types.DreamLogger.html +1 -1
  263. package/docs/types/types.DreamModelSerializerType.html +1 -1
  264. package/docs/types/types.DreamOrViewModelClassSerializerKey.html +1 -1
  265. package/docs/types/types.DreamOrViewModelSerializerKey.html +1 -1
  266. package/docs/types/types.DreamParamSafeAttributes.html +1 -1
  267. package/docs/types/types.DreamParamSafeColumnNames.html +1 -1
  268. package/docs/types/types.DreamSerializable.html +1 -1
  269. package/docs/types/types.DreamSerializableArray.html +1 -1
  270. package/docs/types/types.DreamSerializerKey.html +1 -1
  271. package/docs/types/types.DreamSerializers.html +1 -1
  272. package/docs/types/types.DreamVirtualColumns.html +1 -1
  273. package/docs/types/types.DurationUnit.html +2 -4
  274. package/docs/types/types.EncryptAlgorithm.html +1 -1
  275. package/docs/types/types.HasManyStatement.html +1 -1
  276. package/docs/types/types.HasOneStatement.html +1 -1
  277. package/docs/types/types.Hyphenized.html +1 -1
  278. package/docs/types/types.Pascalized.html +1 -1
  279. package/docs/types/types.PrimaryKeyType.html +1 -1
  280. package/docs/types/types.RoundingPrecision.html +1 -1
  281. package/docs/types/types.SerializerCasing.html +1 -1
  282. package/docs/types/types.SimpleObjectSerializerType.html +1 -1
  283. package/docs/types/types.Snakeified.html +1 -1
  284. package/docs/types/types.StrictInterface.html +1 -1
  285. package/docs/types/types.UpdateableAssociationProperties.html +1 -1
  286. package/docs/types/types.UpdateableProperties.html +1 -1
  287. package/docs/types/types.ValidationType.html +1 -1
  288. package/docs/types/types.ViewModel.html +1 -1
  289. package/docs/types/types.ViewModelClass.html +1 -1
  290. package/docs/types/types.WeekdayName.html +1 -1
  291. package/docs/types/types.WhereStatementForDream.html +1 -1
  292. package/docs/types/types.WhereStatementForDreamClass.html +1 -1
  293. package/docs/variables/index.DreamConst.html +1 -1
  294. package/docs/variables/index.ops.html +1 -1
  295. package/docs/variables/openapi.openapiPrimitiveTypes-1.html +1 -1
  296. package/docs/variables/openapi.openapiShorthandPrimitiveTypes-1.html +1 -1
  297. package/docs/variables/system.DreamAppAllowedPackageManagersEnumValues.html +1 -1
  298. package/docs/variables/system.primaryKeyTypes.html +1 -1
  299. package/package.json +2 -2
  300. package/dist/cjs/src/helpers/db/types/isDateOrDateArrayColumn.js +0 -3
  301. package/dist/cjs/src/helpers/db/types/isTextOrTextArrayColumn.js +0 -3
  302. package/dist/esm/src/helpers/db/types/isDateOrDateArrayColumn.js +0 -3
  303. package/dist/esm/src/helpers/db/types/isTextOrTextArrayColumn.js +0 -3
  304. package/dist/types/src/helpers/db/types/isDateOrDateArrayColumn.d.ts +0 -2
  305. package/dist/types/src/helpers/db/types/isTextOrTextArrayColumn.d.ts +0 -2
@@ -1,9 +1,17 @@
1
1
  import { DateTime as LuxonDateTime, Settings as LuxonSettings } from 'luxon';
2
- import { DateTimeJSOptions, DateTimeObject, DateTimeOptions, DateTimeUnit, DiffResult, DurationLikeObject, DurationUnit, LocaleOptions, ToISOTimeOptions, ToSQLOptions, WeekdayName, Zone } from '../../types/datetime.js';
2
+ import { DateTimeJSOptions, DateTimeObject, DateTimeOptions, DateTimeUnit, DiffResult, DurationLikeObject, DurationUnit, LocaleOptions, ToISOTimeOptions, WeekdayName, Zone } from '../../types/datetime.js';
3
3
  export declare const Settings: typeof LuxonSettings;
4
+ export declare const BASE_DATE_OBJECT: {
5
+ year: number;
6
+ month: number;
7
+ day: number;
8
+ };
4
9
  /**
5
10
  * DateTime wraps Luxon DateTime with microsecond precision (0-999).
6
11
  * The decimal part in ISO/SQL is 6 digits: first 3 = milliseconds, next 3 = microseconds.
12
+ *
13
+ * Full datetime output (toISO, toSQL) is normalized to UTC.
14
+ * Time-only output (toISOTime, toSQLTime) omits timezone offset by default.
7
15
  */
8
16
  export declare class DateTime {
9
17
  protected readonly luxonDatetime: LuxonDateTime;
@@ -41,12 +49,14 @@ export declare class DateTime {
41
49
  get quarter(): number;
42
50
  get zoneName(): string;
43
51
  get offset(): number;
44
- get isValid(): boolean;
45
52
  get invalidReason(): string | null;
46
53
  get invalidExplanation(): string | null;
47
54
  get locale(): string;
48
55
  get zone(): Zone;
49
- protected constructor(luxonDatetime: LuxonDateTime, microseconds?: number);
56
+ /**
57
+ * @internal
58
+ */
59
+ constructor(luxonDatetime: LuxonDateTime, microseconds?: number);
50
60
  /**
51
61
  * Returns the underlying Luxon DateTime instance.
52
62
  * Since Luxon is immutable, it is safe to return the actual object.
@@ -66,7 +76,9 @@ export declare class DateTime {
66
76
  * const now = DateTime.now()
67
77
  * ```
68
78
  */
69
- static now(): DateTime;
79
+ static now({ zone }?: {
80
+ zone?: string | Zone;
81
+ }): DateTime;
70
82
  /**
71
83
  * {@link DateTime.toLocaleString} format like 10/14/1983
72
84
  * @example
@@ -254,14 +266,19 @@ export declare class DateTime {
254
266
  * @param second - Second (0–59)
255
267
  * @param millisecond - Millisecond (0–999)
256
268
  * @param microsecondOrOpts - Microsecond (0–999) or options object
257
- * @param opts - Options (zone, locale, etc.)
269
+ * @param opts - Optional configuration
270
+ * @param opts.zone - Timezone (IANA timezone name or Zone object, defaults to local)
271
+ * @param opts.locale - Locale string (e.g., 'en-US', 'fr-FR')
272
+ * @param opts.numberingSystem - Numbering system (e.g., 'arab', 'beng')
273
+ * @param opts.outputCalendar - Calendar system (e.g., 'islamic', 'hebrew')
258
274
  * @returns A DateTime in the local zone
259
275
  * @example
260
276
  * ```ts
261
277
  * DateTime.local() // now
262
278
  * DateTime.local(2017, 3, 12) // 2017-03-12T00:00:00
263
- * DateTime.local(2017, 3, 12, 5, 45, 10, 765, 123) // with microsecond
264
- * DateTime.local(2017, 3, 12, { zone: 'utc' }) // with options
279
+ * DateTime.local(2017, 3, 12, 10, 30, 45) // 2017-03-12T10:30:45
280
+ * DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456) // with millisecond 123 and microsecond 456
281
+ * DateTime.local(2017, 3, 12, { zone: 'America/New_York' }) // with zone option
265
282
  * ```
266
283
  */
267
284
  static local(year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number, microsecond: number, opts?: DateTimeJSOptions): DateTime;
@@ -284,7 +301,7 @@ export declare class DateTime {
284
301
  * @param second - Second (0–59)
285
302
  * @param millisecond - Millisecond (0–999)
286
303
  * @param microsecondOrOpts - Microsecond (0–999) or options object
287
- * @param options - Options (locale, etc.)
304
+ * @param opts - Options (locale, etc.)
288
305
  * @returns A DateTime in UTC
289
306
  * @example
290
307
  * ```ts
@@ -293,18 +310,22 @@ export declare class DateTime {
293
310
  * DateTime.utc(2017, 3, 12, { locale: 'fr' }) // with options
294
311
  * ```
295
312
  */
296
- static utc(year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number, microsecond: number, options?: LocaleOptions): DateTime;
297
- static utc(year: number, month: number, day: number, hour: number, minute: number, second: number, options?: LocaleOptions): DateTime;
298
- static utc(year: number, month: number, day: number, hour: number, minute: number, options?: LocaleOptions): DateTime;
299
- static utc(year: number, month: number, day: number, hour: number, options?: LocaleOptions): DateTime;
300
- static utc(year: number, month: number, day: number, options?: LocaleOptions): DateTime;
301
- static utc(year: number, month: number, options?: LocaleOptions): DateTime;
302
- static utc(year: number, options?: LocaleOptions): DateTime;
303
- static utc(options?: LocaleOptions): DateTime;
313
+ static utc(year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number, microsecond: number, opts?: LocaleOptions): DateTime;
314
+ static utc(year: number, month: number, day: number, hour: number, minute: number, second: number, opts?: LocaleOptions): DateTime;
315
+ static utc(year: number, month: number, day: number, hour: number, minute: number, opts?: LocaleOptions): DateTime;
316
+ static utc(year: number, month: number, day: number, hour: number, opts?: LocaleOptions): DateTime;
317
+ static utc(year: number, month: number, day: number, opts?: LocaleOptions): DateTime;
318
+ static utc(year: number, month: number, opts?: LocaleOptions): DateTime;
319
+ static utc(year: number, opts?: LocaleOptions): DateTime;
320
+ static utc(opts?: LocaleOptions): DateTime;
304
321
  /**
305
322
  * Create a DateTime from a JavaScript Date.
306
323
  * @param date - A JavaScript Date instance
307
- * @param options - Optional zone for the result
324
+ * @param opts - Optional configuration
325
+ * @param opts.zone - Timezone for the result (IANA timezone name or Zone object)
326
+ * @param opts.locale - Locale string (e.g., 'en-US', 'fr-FR')
327
+ * @param opts.numberingSystem - Numbering system (e.g., 'arab', 'beng')
328
+ * @param opts.outputCalendar - Calendar system (e.g., 'islamic', 'hebrew')
308
329
  * @returns A DateTime representing the same instant
309
330
  * @example
310
331
  * ```ts
@@ -312,72 +333,105 @@ export declare class DateTime {
312
333
  * DateTime.fromJSDate(new Date(), { zone: 'America/New_York' })
313
334
  * ```
314
335
  */
315
- static fromJSDate(date: Date, options?: DateTimeJSOptions): DateTime;
336
+ static fromJSDate(date: Date, opts?: DateTimeJSOptions): DateTime;
316
337
  /**
317
338
  * Create a DateTime from epoch milliseconds.
318
- * @param milliseconds - Unix timestamp in milliseconds
319
- * @param options - Optional zone/locale options
339
+ * @param millisecondInput - Unix timestamp in milliseconds (fractional part becomes microseconds)
340
+ * @param opts - Optional configuration
341
+ * @param opts.zone - Timezone for the result (IANA timezone name or Zone object)
342
+ * @param opts.locale - Locale string (e.g., 'en-US', 'fr-FR')
343
+ * @param opts.numberingSystem - Numbering system (e.g., 'arab', 'beng')
344
+ * @param opts.outputCalendar - Calendar system (e.g., 'islamic', 'hebrew')
320
345
  * @returns A DateTime for the given instant
321
346
  * @example
322
347
  * ```ts
323
348
  * DateTime.fromMillis(1707234567890)
349
+ * DateTime.fromMillis(1707234567890.123) // .123 ms = 123 microseconds
350
+ * DateTime.fromMillis(1707234567890, { zone: 'America/New_York' })
324
351
  * ```
325
352
  */
326
- static fromMillis(milliseconds: number, options?: DateTimeJSOptions): DateTime;
353
+ static fromMillis(millisecondInput: number, opts?: DateTimeJSOptions): DateTime;
327
354
  /**
328
355
  * Create a DateTime from epoch microseconds.
329
356
  * @param microseconds - Unix timestamp in microseconds (milliseconds from quotient, microsecond from remainder)
330
- * @param options - Optional zone/locale options
357
+ * @param opts - Optional configuration
358
+ * @param opts.zone - Timezone for the result (IANA timezone name or Zone object)
359
+ * @param opts.locale - Locale string (e.g., 'en-US', 'fr-FR')
360
+ * @param opts.numberingSystem - Numbering system (e.g., 'arab', 'beng')
361
+ * @param opts.outputCalendar - Calendar system (e.g., 'islamic', 'hebrew')
331
362
  * @returns A DateTime for the given instant
332
363
  * @example
333
364
  * ```ts
334
365
  * DateTime.fromMicroseconds(1707234567890123)
366
+ * DateTime.fromMicroseconds(1707234567890123, { zone: 'America/New_York' })
335
367
  * ```
336
368
  */
337
- static fromMicroseconds(microsecondsInput: number, options?: DateTimeJSOptions): DateTime;
369
+ static fromMicroseconds(microsecondsInput: number, opts?: DateTimeJSOptions): DateTime;
338
370
  /**
339
371
  * Create a DateTime from epoch seconds.
340
- * @param seconds - Unix timestamp in seconds
341
- * @param options - Optional zone/locale options
372
+ * Fractional seconds are converted to milliseconds and microseconds.
373
+ * @param seconds - Unix timestamp in seconds (fractional part becomes ms + µs)
374
+ * @param opts - Optional configuration
375
+ * @param opts.zone - Timezone for the result (IANA timezone name or Zone object)
376
+ * @param opts.locale - Locale string (e.g., 'en-US', 'fr-FR')
377
+ * @param opts.numberingSystem - Numbering system (e.g., 'arab', 'beng')
378
+ * @param opts.outputCalendar - Calendar system (e.g., 'islamic', 'hebrew')
342
379
  * @returns A DateTime for the given instant
343
380
  * @example
344
381
  * ```ts
345
382
  * DateTime.fromSeconds(1707234567)
383
+ * DateTime.fromSeconds(1707234567.123456) // .123456 seconds = 123ms + 456µs
384
+ * DateTime.fromSeconds(1707234567, { zone: 'America/New_York' })
346
385
  * ```
347
386
  */
348
- static fromSeconds(seconds: number, options?: DateTimeJSOptions): DateTime;
387
+ static fromSeconds(seconds: number, opts?: DateTimeJSOptions): DateTime;
349
388
  /**
350
389
  * Create a DateTime from an object with date/time units.
351
390
  * Fractional milliseconds are converted to microseconds (e.g., 1.5 ms = 1 ms + 500 µs).
352
- * @param obj - Object with year, month, day, etc.; supports optional microsecond
353
- * @param opts - Optional zone/locale options
391
+ * @param obj - Object with year, month, day, hour, minute, second, millisecond, microsecond
392
+ * @param opts - Optional configuration
393
+ * @param opts.zone - Timezone for the datetime (IANA timezone name or Zone object)
394
+ * @param opts.locale - Locale string (e.g., 'en-US', 'fr-FR')
395
+ * @param opts.numberingSystem - Numbering system (e.g., 'arab', 'beng')
396
+ * @param opts.outputCalendar - Calendar system (e.g., 'islamic', 'hebrew')
354
397
  * @returns A DateTime for the given components
355
398
  * @example
356
399
  * ```ts
357
400
  * DateTime.fromObject({ year: 2017, month: 3, day: 12, hour: 5, minute: 45, microsecond: 123 })
358
401
  * DateTime.fromObject({ year: 2017, month: 3, day: 12, millisecond: 1.5 }) // 1ms + 500µs
402
+ * DateTime.fromObject({ year: 2017, month: 3, day: 12 }, { zone: 'America/New_York' })
359
403
  * ```
360
404
  */
361
- static fromObject(obj: DateTimeObject, opts?: DateTimeJSOptions): DateTime;
405
+ static fromObject(obj: Partial<DateTimeObject>, opts?: DateTimeJSOptions): DateTime;
362
406
  /**
363
407
  * Create a DateTime from an ISO 8601 string.
364
408
  * @param text - ISO string (e.g. "2024-03-15T10:30:45.123456-05:00"); parses up to 6 fractional second digits
365
- * @param opts - Optional parsing options
409
+ * @param opts - Optional configuration
410
+ * @param opts.zone - Timezone to interpret/convert the datetime in (defaults to UTC)
411
+ * @param opts.locale - Locale string (e.g., 'en-US', 'fr-FR')
412
+ * @param opts.numberingSystem - Numbering system (e.g., 'arab', 'beng')
413
+ * @param opts.outputCalendar - Calendar system (e.g., 'islamic', 'hebrew')
366
414
  * @returns A DateTime for the parsed instant
367
415
  * @example
368
416
  * ```ts
369
417
  * DateTime.fromISO('2024-03-15T10:30:45.123456-05:00')
418
+ * DateTime.fromISO('2024-03-15T10:30:45Z', { zone: 'America/New_York' })
370
419
  * ```
371
420
  */
372
421
  static fromISO(text: string, opts?: DateTimeOptions): DateTime;
373
422
  /**
374
423
  * Create a DateTime from an SQL datetime string.
375
424
  * @param text - SQL string (e.g. "2024-03-15 10:30:45.123456"); parses up to 6 fractional second digits
376
- * @param opts - Optional parsing options
425
+ * @param opts - Optional configuration
426
+ * @param opts.zone - Timezone to interpret the datetime in (overrides timezone in string)
427
+ * @param opts.locale - Locale string (e.g., 'en-US', 'fr-FR')
428
+ * @param opts.numberingSystem - Numbering system (e.g., 'arab', 'beng')
429
+ * @param opts.outputCalendar - Calendar system (e.g., 'islamic', 'hebrew')
377
430
  * @returns A DateTime for the parsed instant
378
431
  * @example
379
432
  * ```ts
380
433
  * DateTime.fromSQL('2024-03-15 10:30:45.123456')
434
+ * DateTime.fromSQL('2024-03-15 10:30:45', { zone: 'America/New_York' })
381
435
  * ```
382
436
  */
383
437
  static fromSQL(text: string, opts?: DateTimeOptions): DateTime;
@@ -401,11 +455,18 @@ export declare class DateTime {
401
455
  static fromFormat(text: string, format: string, opts?: DateTimeOptions): DateTime;
402
456
  /**
403
457
  * Returns an ISO 8601 string with 6 fractional second digits (milliseconds + microseconds).
404
- * @param opts - Optional format options (includeOffset, suppressMilliseconds, etc.)
405
- * @returns ISO string (e.g. "2024-03-15T10:30:45.123456-05:00")
458
+ *
459
+ * Always converts to UTC before formatting (e.g., '2024-03-15T15:30:45.123456Z').
460
+ *
461
+ * @param opts - Optional format options
462
+ * @param opts.suppressMilliseconds - If true, omits fractional seconds when they are zero
463
+ * @param opts.suppressSeconds - If true, omits seconds when they are zero
464
+ * @param opts.includeOffset - If true, includes timezone offset
465
+ * @param opts.format - Format variant: 'basic' (compact) or 'extended' (default, with separators)
466
+ * @returns ISO string (e.g. "2024-03-15T10:30:45.123456-05:00" or "2024-03-15T10:30:45.123456Z")
406
467
  * @example
407
468
  * ```ts
408
- * DateTime.fromISO('2024-03-15T10:30:45.123456').toISO()
469
+ * DateTime.fromISO('2024-03-15T10:30:45.123456').toISO() // Converts to UTC
409
470
  * ```
410
471
  */
411
472
  toISO(opts?: ToISOTimeOptions): string;
@@ -420,24 +481,34 @@ export declare class DateTime {
420
481
  toISODate(): string;
421
482
  /**
422
483
  * Returns the time portion in ISO format with 6 fractional second digits.
484
+ *
485
+ * Omits timezone offset by default (e.g., '10:30:45.123456').
486
+ *
423
487
  * @param opts - Optional format options
424
- * @returns Time string (e.g. "10:30:45.123456-05:00")
488
+ * @param opts.suppressMilliseconds - If true, omits fractional seconds when they are zero
489
+ * @param opts.suppressSeconds - If true, omits seconds when they are zero
490
+ * @param opts.includeOffset - If true, includes timezone offset
491
+ * @param opts.format - Format variant: 'basic' (compact) or 'extended' (default, with colons)
492
+ * @returns Time string (e.g. "10:30:45.123456" or "10:30:45.123456-05:00")
425
493
  * @example
426
494
  * ```ts
427
- * DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456).toISOTime()
495
+ * DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456).toISOTime() // '10:30:45.123456'
428
496
  * ```
429
497
  */
430
498
  toISOTime(opts?: ToISOTimeOptions): string;
431
499
  /**
432
500
  * Returns an SQL datetime string with 6 fractional second digits.
433
- * @param opts - Optional format options
501
+ *
502
+ * Always converts to UTC before formatting (e.g., '2024-03-15 15:30:45.123456').
503
+ *
434
504
  * @returns SQL string (e.g. "2024-03-15 10:30:45.123456")
435
505
  * @example
436
506
  * ```ts
437
- * DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456).toSQL()
507
+ * DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456).toSQL() // Converts to UTC
438
508
  * ```
439
509
  */
440
- toSQL(opts?: ToSQLOptions): string;
510
+ private _toSQL;
511
+ toSQL(): string;
441
512
  /**
442
513
  * Returns an SQL date string (date only, no time).
443
514
  * @returns SQL date string (e.g. "2024-03-15")
@@ -449,14 +520,21 @@ export declare class DateTime {
449
520
  toSQLDate(): string;
450
521
  /**
451
522
  * Returns an SQL time string with 6 fractional second digits.
452
- * @param opts - Optional format options
523
+ *
524
+ * Omits timezone offset by default.
525
+ *
526
+ * @param opts - Optional SQL time format options
527
+ * @param opts.includeOffset - If true, includes timezone offset
453
528
  * @returns SQL time string (e.g. "10:30:45.123456")
454
529
  * @example
455
530
  * ```ts
456
- * DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456).toSQLTime()
531
+ * DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456).toSQLTime() // '10:30:45.123456'
532
+ * DateTime.local(2017, 3, 12, 10, 30, 45, 123, 456).toSQLTime({ includeOffset: true }) // '10:30:45.123456 -04:00'
457
533
  * ```
458
534
  */
459
- toSQLTime(opts?: ToSQLOptions): string;
535
+ toSQLTime(opts?: {
536
+ includeOffset?: boolean;
537
+ }): string;
460
538
  /**
461
539
  * Returns a JavaScript Date object.
462
540
  * @returns JavaScript Date
@@ -467,19 +545,25 @@ export declare class DateTime {
467
545
  */
468
546
  toJSDate(): Date;
469
547
  /**
470
- * Returns the epoch time in microseconds (for valueOf() operations).
471
- * Includes full microsecond precision.
472
- * @returns Unix timestamp in microseconds
548
+ * Returns an ISO 8601 string representation (for valueOf() operations).
549
+ *
550
+ * Converts to UTC before formatting.
551
+ *
552
+ * @returns ISO datetime string with microsecond precision
473
553
  * @example
474
554
  * ```ts
475
- * DateTime.local(2017, 3, 12).valueOf()
476
- * DateTime.fromISO('2026-02-07T09:03:44.123456Z').valueOf() // includes microseconds
555
+ * DateTime.local(2017, 3, 12).valueOf() // Converts to UTC
556
+ * DateTime.fromISO('2026-02-07T09:03:44.123456Z').valueOf() // '2026-02-07T09:03:44.123456Z'
477
557
  * ```
478
558
  */
479
- valueOf(): number;
559
+ private _valueOf;
560
+ valueOf(): string;
480
561
  /**
481
562
  * Returns an ISO 8601 formatted string for JSON serialization.
482
563
  * This ensures DateTime objects are properly serialized to ISO format.
564
+ *
565
+ * Converts to UTC before formatting.
566
+ *
483
567
  * @returns ISO datetime string with microsecond precision
484
568
  * @example
485
569
  * ```ts
@@ -491,6 +575,9 @@ export declare class DateTime {
491
575
  /**
492
576
  * Returns an ISO 8601 formatted string representation.
493
577
  * Alias for toISO().
578
+ *
579
+ * Converts to UTC before formatting.
580
+ *
494
581
  * @returns ISO datetime string with microsecond precision
495
582
  * @example
496
583
  * ```ts
@@ -502,12 +589,17 @@ export declare class DateTime {
502
589
  toString(): string;
503
590
  /**
504
591
  * Returns a localized string representation.
505
- * @param formatOpts - Optional format options
506
- * @param opts - Optional locale options
592
+ * @param formatOpts - Intl.DateTimeFormat options for formatting
593
+ * @param opts - Optional locale configuration
594
+ * @param opts.locale - Locale string (e.g., 'en-US', 'fr-FR')
595
+ * @param opts.numberingSystem - Numbering system (e.g., 'arab', 'beng')
596
+ * @param opts.outputCalendar - Calendar system (e.g., 'islamic', 'hebrew')
507
597
  * @returns Localized string
508
598
  * @example
509
599
  * ```ts
510
600
  * DateTime.local(2017, 3, 12).toLocaleString()
601
+ * DateTime.local(2017, 3, 12).toLocaleString(DateTime.DATE_FULL)
602
+ * DateTime.local(2017, 3, 12).toLocaleString({ weekday: 'long' }, { locale: 'fr-FR' })
511
603
  * ```
512
604
  */
513
605
  toLocaleString(formatOpts?: Intl.DateTimeFormatOptions, opts?: LocaleOptions): string;
@@ -560,19 +652,16 @@ export declare class DateTime {
560
652
  * DateTime.local(2017, 3, 12).set({ hour: 14, microsecond: 500 })
561
653
  * ```
562
654
  */
563
- set(values: DateTimeObject): DateTime;
655
+ set(values: Partial<DateTimeObject>): DateTime;
564
656
  /**
565
657
  * Returns an object with date/time components including microsecond.
566
- * @param opts - Optional options (includeConfig for Luxon config)
567
658
  * @returns Object with year, month, day, hour, minute, second, millisecond, microsecond
568
659
  * @example
569
660
  * ```ts
570
661
  * DateTime.local(2017, 3, 12, 5, 45, 10, 123, 456).toObject()
571
662
  * ```
572
663
  */
573
- toObject(opts?: {
574
- includeConfig?: boolean;
575
- }): DateTimeObject;
664
+ toObject(): DateTimeObject;
576
665
  /**
577
666
  * Returns true if this and other represent the same instant and microsecond.
578
667
  * @param other - DateTime to compare
@@ -613,18 +702,32 @@ export declare class DateTime {
613
702
  */
614
703
  toSeconds(): number;
615
704
  /**
616
- * Returns the epoch time in seconds as an integer (floor of toSeconds).
617
- * Truncates any fractional seconds, returning only the whole seconds portion.
618
- * Equivalent to Math.floor(toSeconds()).
619
- * @returns Unix timestamp in seconds (integer only, no fractional part)
705
+ * Returns the epoch time in seconds as an integer, truncating any fractional part.
706
+ * @example
707
+ * ```ts
708
+ * DateTime.fromISO('2026-02-07T09:03:44.123456Z').unixIntegerSeconds // 1770455024
709
+ * DateTime.fromISO('2026-02-07T09:03:44.999999Z').unixIntegerSeconds // 1770455024 (not rounded up)
710
+ * ```
711
+ */
712
+ get unixIntegerSeconds(): number;
713
+ /**
714
+ * Returns the epoch time in milliseconds as an integer, truncating any fractional part.
715
+ * @example
716
+ * ```ts
717
+ * DateTime.fromISO('2026-02-07T09:03:44.123456Z').unixIntegerMilliseconds // 1770455024123
718
+ * DateTime.fromISO('2026-02-07T09:03:44.123999Z').unixIntegerMilliseconds // 1770455024123 (not rounded up)
719
+ * ```
720
+ */
721
+ get unixIntegerMilliseconds(): number;
722
+ /**
723
+ * Returns the epoch time in microseconds as an integer.
724
+ * Equivalent to `toMicroseconds()` since microseconds are always whole numbers.
620
725
  * @example
621
726
  * ```ts
622
- * DateTime.fromSeconds(1707234567).toUnixInteger() // 1707234567
623
- * DateTime.fromISO('2026-02-07T09:03:44.123456Z').toUnixInteger() // 1770455024 (fractional part truncated)
624
- * DateTime.fromISO('2026-02-07T09:03:44.999999Z').toUnixInteger() // 1770455024 (not rounded up)
727
+ * DateTime.fromISO('2026-02-07T09:03:44.123456Z').unixIntegerMicroseconds // 1770455024123456
625
728
  * ```
626
729
  */
627
- toUnixInteger(): number;
730
+ get unixIntegerMicroseconds(): number;
628
731
  /**
629
732
  * Returns the earliest DateTime from the given arguments.
630
733
  * @param dateTimes - DateTimes to compare
@@ -754,10 +857,10 @@ export declare class DateTime {
754
857
  * dt1.diff(dt2, 'days') // { days: 5 }
755
858
  * dt1.diff(dt2, ['days', 'hours']) // { days: 5, hours: 3 }
756
859
  * dt1.diff(dt2, ['milliseconds', 'microseconds']) // { milliseconds: 123, microseconds: 456 }
757
- * dt1.diff(dt2) // { years: 0, months: 0, ..., milliseconds: 123 }
860
+ * dt1.diff(dt2) // { years: 0, months: 0, days: 0, hours: 0, minutes: 0, seconds: 1, milliseconds: 500, microseconds: 0 }
758
861
  * ```
759
862
  */
760
- diff<U extends DurationUnit | readonly DurationUnit[] | undefined = undefined>(other: DateTime, unit?: U): DiffResult<U>;
863
+ diff<U extends DurationUnit | DurationUnit[] | undefined = undefined>(other: DateTime, unit?: U): DiffResult<U>;
761
864
  /**
762
865
  * Returns the difference between this DateTime and now.
763
866
  *
@@ -771,7 +874,7 @@ export declare class DateTime {
771
874
  * dt.diffNow(['days', 'hours', 'microseconds']) // { days: 5, hours: 3, microseconds: 123 }
772
875
  * ```
773
876
  */
774
- diffNow<U extends DurationUnit | readonly DurationUnit[] | undefined = undefined>(unit?: U): DiffResult<U>;
877
+ diffNow<U extends DurationUnit | DurationUnit[] | undefined = undefined>(unit?: U): DiffResult<U>;
775
878
  }
776
879
  /**
777
880
  * Thrown when a DateTime is invalid (e.g. invalid input or Luxon error).
@@ -1,4 +1,5 @@
1
1
  import { DateTime } from '../DateTime.js';
2
- export default function isoTimeDecimalString(datetime: DateTime, { nullIfZero }: {
3
- nullIfZero: boolean | undefined;
2
+ export default function isoTimeDecimalString(datetime: DateTime, { nullIfZero, truncateMicroseconds, }: {
3
+ nullIfZero?: boolean | undefined;
4
+ truncateMicroseconds?: boolean | undefined;
4
5
  }): string | null;
@@ -1,3 +1,5 @@
1
- import type { ToISOTimeOptions } from '../../../types/datetime.js';
2
1
  import type { DateTime } from '../DateTime.js';
3
- export default function replaceISOMicroseconds(timeObj: DateTime, isoString: string, opts: ToISOTimeOptions | undefined): string;
2
+ export default function replaceISOMicroseconds(timeObj: DateTime, isoString: string, opts: {
3
+ truncateMicroseconds?: boolean;
4
+ suppressMilliseconds?: boolean;
5
+ } | undefined): string;
@@ -1 +1 @@
1
- window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE62bXXfjKBKG/4uvez+6d2d2t+8cO5nx6STOJOn0xZy+wFLFZoNAAyjdmj3z3/egDwskKJAydz7SW8+LJCihAv/6v5WG73r1cZUfVu9WJdGn1cdVIfKKgfpbfvjrSRds9W71Qnm++vjh3So7UZZL4KuPv55DtxJIcUOPkmgq+M/ASpBqoGWMKNXSvErX4/2Hf//x7oz+VCtg9S8VyHor6StIL3aiwpB3QumjBBWDenQY1pJdEAVe5EiD4TImFKwZ2x42gnPIzP2y7ulzxdtDBuvVuvAf/2mxc/MUUsBTIUKtuK5LyLeHAOx8HmG8EkZzomEjWFXwAMgVJdAeyYFBBNZoJqyvFg2kFHa37gdJezxpoGxOkL1sBFdaEsr1ExWsGQjTztJBQwFYz2lvy/4V5DMT38JoR4YCJRANe3lFeX5RXxHKIH8U7dE1z83hsEs8FrPeEk12PBNFSTQ9MPhC9ckcOxAFVxRY2DgaGbN9rMuuh5lfN1QVRGcn1M8fghn9xMSBsFtSwK3QD6CD+LEQg+5406k3hAHPidwS7clGHdejTUAb2SMtothehyFvqFKUHx9AUsLo7yDVFp4pp+i4wIIws1vBrwXJIV8rJTKKDz6fGIfr24qx+KgeCzHoPWRC5rdCX4kKGWeuDAM+tQmPCn5pQoPEkQ5DlsdGYjq9L8t2QEuF5lnKc/g+TbPN4bQsi3b8lp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