@fable-org/fable-library-ts 1.2.0 → 1.3.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.
- package/Boolean.ts +2 -2
- package/CHANGELOG.md +4 -0
- package/Date.ts +1 -1
- package/package.json +1 -1
package/Boolean.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FSharpRef } from "./Types.js"
|
|
2
2
|
|
|
3
3
|
export function tryParse(str: string, defValue: FSharpRef<boolean>): boolean {
|
|
4
|
-
if (str.match(/^\s*true\s*$/i)) {
|
|
4
|
+
if (str != null && str.match(/^\s*true\s*$/i)) {
|
|
5
5
|
defValue.contents = true;
|
|
6
6
|
return true;
|
|
7
|
-
} else if (str.match(/^\s*false\s*$/i)) {
|
|
7
|
+
} else if (str != null && str.match(/^\s*false\s*$/i)) {
|
|
8
8
|
defValue.contents = false;
|
|
9
9
|
return true;
|
|
10
10
|
}
|
package/CHANGELOG.md
CHANGED
package/Date.ts
CHANGED
|
@@ -710,7 +710,7 @@ export function dayOfYear(d: IDateTime) {
|
|
|
710
710
|
|
|
711
711
|
export function add(d: IDateTime, ts: number) {
|
|
712
712
|
const newDate = DateTime(d.getTime() + ts, d.kind);
|
|
713
|
-
if (d.kind
|
|
713
|
+
if (d.kind !== DateKind.UTC) {
|
|
714
714
|
const oldTzOffset = d.getTimezoneOffset();
|
|
715
715
|
const newTzOffset = newDate.getTimezoneOffset();
|
|
716
716
|
return oldTzOffset !== newTzOffset
|
package/package.json
CHANGED