diff --git a/package.json b/package.json index dd64dcd..258ca79 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "iso-fns", "description": "A string-based date-time library for Javascript.", - "version": "2.0.0-alpha.20", + "version": "2.0.0-alpha.21", "main": "./cjs/index.js", "module": "./esm/index.js", "exports": { diff --git a/src/fns/instantFns.ts b/src/fns/instantFns.ts index c67e91a..4fcf69a 100644 --- a/src/fns/instantFns.ts +++ b/src/fns/instantFns.ts @@ -179,7 +179,7 @@ export const instantFns: IInstantFns = { }, formatISO9075(instant) { if (!ES.IsTemporalInstant(instant)) throw new TypeError('invalid receiver') - return instant.slice(0, -1).replace('T', ' ') as Iso.DateTime + return instant.slice(0, -1).replace('T', ' ') }, toJsDate(instant) { return new Date(instant) diff --git a/src/types/IInstantFns.ts b/src/types/IInstantFns.ts index 7193c6c..7c46d48 100644 --- a/src/types/IInstantFns.ts +++ b/src/types/IInstantFns.ts @@ -89,7 +89,7 @@ export interface IInstantFns { isEqualOrBefore(instant: Iso.Instant, other: Iso.Instant): boolean isEqualOrAfter(instant: Iso.Instant, other: Iso.Instant): boolean toZonedDateTime(instant: Iso.Instant, timeZone: string): Iso.ZonedDateTime - formatISO9075(instant: Iso.Instant): Iso.DateTime + formatISO9075(instant: Iso.Instant): string toJsDate(instant: Iso.Instant): Date fromEpochSeconds(epochSeconds: number): Iso.Instant from(item: any): Iso.Instant