node-sqlserver-v8 icon indicating copy to clipboard operation
node-sqlserver-v8 copied to clipboard

`ConcreteColumnType.parseSS` method tampers with plain date strings

Open gulshan opened this issue 1 year ago • 1 comments

The ConcreteColumnType.parseSS method in user.js file uses the RegExp value /(\d?\d)$/g. This matches any regular date strings like 2020-01-01. When the match is found the value of the parameter is changed to ~1900-01-01.

Please check this and make necessary corrections. Thanks in advance.

gulshan avatar Jan 12 '24 10:01 gulshan

I have made this temporary change to make plain date strings work in user.js file-

      parse (s) {
        if (!this.parseHHMMSS(s) && !this.parseMMSS(s) /*&& !this.parseSS(s)*/) {
          this.value = (typeof s === 'string') ? new Date(s) : s
        }
      }

gulshan avatar Jan 12 '24 13:01 gulshan

no tests break with this change, so i have merged it - thanks

TimelordUK avatar Apr 21 '24 15:04 TimelordUK

Thank you for checking this. Closing the issue.

gulshan avatar Apr 21 '24 17:04 gulshan