This is an archived forum post. The information may be outdated. Contact us if you have any questions.

momentjs broken in pdfcrowd

bengladwell wrote on 2015-05-01:
momentjs parsing seems to be broken in pdfcrowd. The JS in the following page attempts to construct a momentjs object and display it. moment('201505', 'YYYYMM') results in an invalid moment object when executed in pdfcrowd. I tried a couple other format strings in the constructor (not just "YYYYMM") and got the same result.

Any insight is appreciated.

<html>
 <head>
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script>
  <script type="text/javascript">
    window.onload = function () {
      var body = document.querySelector('body'),
        date = moment('201505', 'YYYYMM');
      body.textContent = date.format('MMM YYYY');
    };
  </script>
 </head>
 <body>
  Type your HTML here ...
 </body>
</html>
support wrote on 2015-05-05:
Hello,

We investigated it but are unable to determine the reason why it does not work, sorry.