From 06b741c0252ed263edd0e31a0757c6bcdb86ea61 Mon Sep 17 00:00:00 2001 From: ncave <777696+ncave@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:31:01 -0700 Subject: [PATCH] Fixed #3836 --- src/Fable.Cli/CHANGELOG.md | 4 ++++ src/fable-library-ts/Date.ts | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Fable.Cli/CHANGELOG.md b/src/Fable.Cli/CHANGELOG.md index 27badc204f..965c110ca3 100644 --- a/src/Fable.Cli/CHANGELOG.md +++ b/src/Fable.Cli/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Fixed + +* [JS/TS] Fixed DateTime.MinValue, DateTime.MaxValue (#3836) (by @ncave) + ## 4.19.0 - 2024-06-10 ### Fixed diff --git a/src/fable-library-ts/Date.ts b/src/fable-library-ts/Date.ts index a3766aa4e8..67b2ad009f 100644 --- a/src/fable-library-ts/Date.ts +++ b/src/fable-library-ts/Date.ts @@ -498,12 +498,12 @@ export function getTicks(date: IDateTime | IDateTimeOffset) { export function minValue() { // This is "0001-01-01T00:00:00.000Z", actual JS min value is -8640000000000000 - return DateTime(-62135596800000, DateKind.Unspecified); + return DateTime(-62135596800000, DateKind.UTC); } export function maxValue() { // This is "9999-12-31T23:59:59.999Z", actual JS max value is 8640000000000000 - return DateTime(253402300799999, DateKind.Unspecified); + return DateTime(253402300799999, DateKind.UTC); } export function parseRaw(input: string): [Date, Offset] {