From 98fdb11ba9734f0975118cf68b23b91ab01253d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BB=D0=B0=D0=B2=D0=B0=20=D0=A3=D0=BA=D1=80=D0=B0?= =?UTF-8?q?=D1=97=D0=BD=D1=96!=20=D0=93=D0=B5=D1=80=D0=BE=D1=8F=D0=BC=20?= =?UTF-8?q?=D1=81=D0=BB=D0=B0=D0=B2=D0=B0!?= <777696+ncave@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:45:10 -0700 Subject: [PATCH] Fixed #3836 (#3840) --- 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] {