Moment last day of month parsing issue : <p>Why is this not working? I'm going crazy here trying to find where I might have gone wrong but nothing comes to mind. Tested only in Chrome.</p>

<pre><code>var startString = "30.01.2017";
var endString = "31.01.2017";

// is OK
var startDate = moment(startString, "DD.MM.YYYY", 'bs',true).clone().toDate();

// breaks down
var endDate = moment(endtString, "DD.MM.YYYY", 'bs',true).clone().toDate();

// console dump
Uncaught ReferenceError: endtString is not defined
at HTMLDocument.&lt;anonymous&gt; (Kreiraj:1062)
at j (jquery.js:3094)
at Object.fireWith [as resolveWith] (jquery.js:3206)
at Function.ready (jquery.js:3412)
at HTMLDocument.I (jquery.js:3428)
</code></pre>

<p>What did I do wrong?</p>
