Skip to content

Commit fabe1c8

Browse files
authored
fix: add year padding to the codec (#101)
Added year padding to the codec to cover the case when backend returns that should be treated as valid date
1 parent 8e6d06e commit fabe1c8

File tree

1 file changed

+1
-1
lines changed
  • src/language/typescript/common/bundled

1 file changed

+1
-1
lines changed

src/language/typescript/common/bundled/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const utils = `
3333
return isNaN(d.getTime()) ? failure(u, c) : success(d);
3434
}),
3535
a =>
36-
\`\${a.getFullYear()}-\${(a.getMonth() + 1).toString().padStart(2, '0')}-\${a
36+
\`\${a.getFullYear().toString().padStart(4, '0')}-\${(a.getMonth() + 1).toString().padStart(2, '0')}-\${a
3737
.getDate()
3838
.toString()
3939
.padStart(2, '0')}\`,

0 commit comments

Comments
 (0)