<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="">Some responses inline:</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 21, 2016, at 10:22 PM, Taylor Franklin <<a href="mailto:taylorleefranklin@gmail.com" class="">taylorleefranklin@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Thanks Joe,<div class=""><br class=""></div><div class="">I will probably end up taking some of your work and execute Philippe's suggestion of testing with a dictionary. In the process of adding tests, hopefully I can improve NSDateFormatter over the next few weeks.</div></div></div></blockquote><div><br class=""></div><div>Awesome, feel free to reach out if you have questions on the appropriate behaviors/edge cases.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">@Philippe, I did have a question:</div><div class=""><br class=""></div><div class="">Currently, many of the properties, such as locale, look like this:</div><div class=""><br class=""></div><div class=""><font face="monospace, monospace" class="">/*@NSCopying*/ public var locale: NSLocale! { willSet { _reset() } }</font></div></div></div></blockquote><div><br class=""></div><div>This was changed to support the willSet pre-operation.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="arial, helvetica, sans-serif" class="">When previously, the looked like this:</font></div><div class=""><font face="arial, helvetica, sans-serif" class=""><br class=""></font></div><div class=""><div style="font-family:monospace,monospace" class="">internal var _locale: NSLocale = NSLocale.currentLocale()</div><div style="font-family:monospace,monospace" class="">/*@NSCopying*/ public var locale: NSLocale! {</div><div style="font-family:monospace,monospace" class=""> get {</div><div style="font-family:monospace,monospace" class=""> return _locale</div><div style="font-family:monospace,monospace" class=""> }</div><div style="font-family:monospace,monospace" class=""> set {</div><div style="font-family:monospace,monospace" class=""> _reset()</div><div style="font-family:monospace,monospace" class=""> _locale = newValue</div><div style="font-family:monospace,monospace" class=""> }</div><div style="font-family:monospace,monospace" class="">}</div><div style="font-family:monospace,monospace" class=""><br class=""></div><div class=""><font face="arial, helvetica, sans-serif" class="">Do you know a reason for this change? It seems mostly the same except the there is no default value set anymore.</font></div><div class=""><font face="arial, helvetica, sans-serif" class="">The pull request I'm referring to that made these changes is this: <a href="https://github.com/apple/swift-corelibs-foundation/pull/234" class="">https://github.com/apple/swift-corelibs-foundation/pull/234</a></font></div></div></div></div></blockquote><div><br class=""></div><div>The change should have been a non-functional change; if there are behavioral differences it is definitely a bug. The original version of that was written to be very close to the objective-c version (to the point that I actually inadvertently replicated a few bugs…)</div><div><br class=""></div><div>If you can show via test that the behavior is different we can look into reverting/fixing date formatter.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><font face="arial, helvetica, sans-serif" class=""><br class=""></font></div><div class=""><font face="arial, helvetica, sans-serif" class="">Thanks!</font></div><div class=""><font face="arial, helvetica, sans-serif" class="">Taylor</font></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sun, Feb 21, 2016 at 7:17 AM, Joseph Bell <span dir="ltr" class=""><<a href="mailto:joe@iachieved.it" target="_blank" class="">joe@iachieved.it</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr" class="">Ah, I didn't even submit a pull request - that's how distracted I've been. Again, the code is all yours to rework or base off of if you so choose.</div><div class=""><div class="h5"><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sun, Feb 21, 2016 at 7:14 AM, Joseph Bell <span dir="ltr" class=""><<a href="mailto:joe@iachieved.it" target="_blank" class="">joe@iachieved.it</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr" class="">Thanks Taylor. Unfortunately I lost time and interest in taking the idea further, I just need to figure out how to withdraw the pull request. Feel free to take the implementation and rework per Philippe's suggestions!<div class=""><br class=""></div><div class="">Joe</div><div class=""><br class=""></div></div><div class="gmail_extra"><div class=""><div class=""><br class=""><div class="gmail_quote">On Fri, Feb 19, 2016 at 6:35 PM, Philippe Hausler <span dir="ltr" class=""><<a href="mailto:phausler@apple.com" target="_blank" class="">phausler@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word" 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 class=""><blockquote type="cite" class=""><div class=""><div 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" target="_blank" class="">swift-corelibs-dev@swift.org</a>> wrote:</div><br class=""></div></div><div class=""><div class=""><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></div></div>
_______________________________________________<br class="">swift-corelibs-dev mailing list<br class=""><a href="mailto:swift-corelibs-dev@swift.org" target="_blank" class="">swift-corelibs-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</a><br class=""></div></blockquote></div><br class=""></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div></div></div><span class=""><font color="#888888" class="">-- <br class=""><div class=""><div dir="ltr" class="">---<div class=""><a href="http://dev.iachieved.it/iachievedit/" target="_blank" class="">http://dev.iachieved.it/iachievedit/</a></div><div class="">@iachievedit</div></div></div>
</font></span></div>
</blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class=""><div dir="ltr" class="">---<div class=""><a href="http://dev.iachieved.it/iachievedit/" target="_blank" class="">http://dev.iachieved.it/iachievedit/</a></div><div class="">@iachievedit</div></div></div>
</div>
</div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><b class=""><font face="arial, helvetica, sans-serif" size="2" class="">Taylor Franklin</font></b><div class="">iOS Developer | IBM Mobile Innovation Lab</div><div class="">972-207-2051 | <a href="mailto:taylorleefranklin@gmail.com" target="_blank" class="">taylorleefranklin@gmail.com</a></div><div class=""><i class="">Blog</i>: <a href="http://taylorfranklin.me/" style="color:rgb(17,85,204);font-size:small" target="_blank" class="">http://taylorfranklin.me</a> | <i class="">LinkedIn</i>: <a href="https://www.linkedin.com/in/taylorfranklin" target="_blank" class="">https://www.linkedin.com/in/taylorfranklin</a></div></div></div></div></div>
</div></div></div>
</div></blockquote></div><br class=""></body></html>