<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Dec 6, 2013 at 3:08 PM, Mark Gaiser <span dir="ltr"><<a href="mailto:markg85@gmail.com" target="_blank">markg85@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br></div>
-- Locale --<br>
In KDE there was already an issue with differences between the<br>
JavaScript date object and the QDate object. I don't know the fine<br>
details here, someone else will probably fill that in i hope. I know<br>
there where issues, just not what exactly.<br></blockquote><div><br></div><div>The problem is different values for same things - JS Date object numbers months from 0 to 11 whereas QDate's months are from 1 to 12. Same goes for days-in-the-week enum - JS Date starts at 0 = Sunday .. 6 = Saturday, while QDate has 1 = Monday .. 7 = Sunday. There might be more differences.</div>
<div><br></div><div>So you cannot pass direct values between QML and C++ (like passing QDate::month() to JS), passing whole date objects should be fine afaik (eg. passing JS Date to a C++ function expecting QDate).</div>
<div>
<br></div></div><div>Cheers</div>-- <br><div><span style="color:rgb(102,102,102)">Martin Klapetek | KDE Developer</span></div>
</div></div>