diff options
Diffstat (limited to 'source/pdf/js/util.js')
-rw-r--r-- | source/pdf/js/util.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/pdf/js/util.js b/source/pdf/js/util.js index dd58dff7..038014c3 100644 --- a/source/pdf/js/util.js +++ b/source/pdf/js/util.js @@ -554,6 +554,19 @@ function AFParseDateEx(d, fmt) { dout.setHours(12, 0, 0); + if (nums.length == 1 && nums[0].length == fmt.length && !text_month) { + // One number string, exactly matching the format string in length. + // Split it into separate strings to match the fmt + var num = nums[0]; + nums = [""]; + for (i = 0; i < fmt.length; i++) + { + nums[nums.length-1] += num.charAt(i); + if (i+1 < fmt.length && fmt.charAt(i) != fmt.charAt(i+1)) + nums.push(""); + } + } + if (!nums || nums.length < 1 || nums.length > 3) return null; |