Thread:Fngplg/@comment-9605025-20200201172741/@comment-27958705-20200202230600

same as any other lang: by tracing execution path up (or down, in this case) to the problem. step-by-step it was:
 * 1) error message (invalid...) have been returned by "dateerror" function
 * 2) that means the error was somewhere before the function
 * 3) there are 9 calls of the fn, so i have to find what exact call produces the error
 * 4) in order to do this, i would set log(1-9) right before the fn, but in this case i just added param to fn: dateerror(1-9), so fn have returned "invalid... 1"
 * 5) so problem was somewhere before the "if parts..."
 * 6) there is only one meaningful line before it: the .split one
 * 7) there is only two reasons to fail .split: bad date and bad pattern
 * 8) i have supplied good date, so the problem was with the pattern
 * 9) quick test in the console (...split('1/1/1',...)...) shows empty values in the resulting table, along with bad table length
 * 10) the problem definetely in the pattern
 * 11) i did re-read the docs about ansi and utf patterns and tried another way to write the pattern
 * 12) it have worked
 * 13) both ways supposed to work
 * 14) fandom's text library has bugs