<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">The problem with the change in that commit is that it is doing two different things: it is testing against python which is not the definition of Foundation’s expected output instead of testing against the expected output from the objective-c implementation. My suggestion in the pull request was to just encode a dictionary of dates to strings sampling a well known range before hand. This way it would be verifiable on both linux and Darwin as “correct” in accordance with the version of Foundation.framework that ships on Mac OS X and iOS. </div><div class=""><br class=""></div><div class="">The rest of the additions seemed pretty reasonable to me, except the case of calling popen to run a secondary script that may take extra execution time and add extra complexity other than just a dictionary of some good example date to string conversions (which actually could be utilized to reverse the test as well for scanning).</div><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 19, 2016, at 4:13 PM, Taylor Franklin via swift-corelibs-dev <<a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class="">Hello,</div><div class=""><br class=""></div><div class="">Are there any plans to integrate this commit into the main repo because I would love build off of the code within it, seeing that NSDateFormatter still seems incomplete. Additionally, the issue mentioned earlier, <a href="https://bugs.swift.org/browse/SR-208" target="_blank" class="">https://bugs.swift.org/browse/SR-208</a>, is still valid with the latest code from master.</div><div class=""><br class=""></div><div class="">In fact, <font face="monospace, monospace" class="">stringFromDate</font> doesn't seem to be doing much at all. Anyway, I would love to hear more from Joe or an admin on plans and progress for NSDateFormatter.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Taylor Franklin</div></div><div class=""><br class=""></div><div class="">> Howdy,</div><div class="">> </div><div class="">> A few weeks ago I opened <a href="https://bugs.swift.org/browse/SR-208" target="_blank" class="">https://bugs.swift.org/browse/SR-208</a> as it appears</div><div class="">> setting the dateFormat property of NSDateFormatter has no effect. It's</div><div class="">> been open for a while and I thought I'd start looking at whether or not I</div><div class="">> could help, and decided to first start with getting NSDateFormatter</div><div class="">> included in TestFoundation.</div><div class="">> </div><div class="">> Before moving on further and issuing a PR, I would appreciate feedback on</div><div class="">> the approach that I'm taking here:</div><div class="">> </div><div class="">> <a href="https://github.com/iachievedit/swift-corelibs-foundation/commit/482d861127e8b78007ceaf15f6c905ac04b1e9a4" target="_blank" class="">https://github.com/iachievedit/swift-corelibs-foundation/commit/482d861127e8b78007ceaf15f6c905ac04b1e9a4</a></div><div class="">> </div><div class="">> The first tests are only looking at the dateStyle property, and I've</div><div class="">> included tests for the various styles as they are rendered for the en_US</div><div class="">> locale. The intent is to add support for validating additional locales in</div><div class="">> the future.</div><div class="">> </div><div class="">> Since strptime doesn't appear to be available to the Glibc module I'm using</div><div class="">> a quick Python script included in Resources/ to take a format string and</div><div class="">> render a human-friendly date.</div><div class="">> </div><div class="">> At the moment I know there is a discrepancy between what NSDateFormatter</div><div class="">> and the python driver can emit, the python script is currently adjusting to</div><div class="">> my timezone and not using UTC, but that will be fixed before a PR is</div><div class="">> issued. I'll also add the timeStyle property and then continue to add</div><div class="">> tests.</div><div class="">> </div><div class="">> Thoughts and comments most welcome, and Happy New Year.</div><div class="">> </div><div class="">> Joe</div><div class="">> </div><div class="">> </div><div class="">> </div>
</div>
_______________________________________________<br class="">swift-corelibs-dev mailing list<br class=""><a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev<br class=""></div></blockquote></div><br class=""></body></html>