[swift-corelibs-dev] Testcases for NSDateFormatter
Taylor Franklin
taylorleefranklin at gmail.com
Sat Feb 27 13:44:17 CST 2016
Thanks for the response Will, that makes a lot of sense.
I will be sure to try something along the lines of your code snippet, this
weekend.
I could use a map function for creating the [String], but I'm not sure that
is more efficient.
Thanks again,
Taylor Franklin
On Fri, Feb 26, 2016 at 7:28 PM, Will Stanton <willstanton1 at yahoo.com>
wrote:
> Hello Taylor,
>
> If I understand what you’re asking, I feel like NS(Date/Number)Formatter
> property getters should be like:
> CFDateFormatterCopyProperty(_cfObject, __CF_PROPERTY__)
>
> Perhaps Philippe or Tony can confirm? Would like to know what they think.
> (And while I’m at it: Any plans for CFAttributedString and write/read
> streams to become available?)
>
>
> So, ex. for month symbols:
> internal var _monthSymbols: [String]!
> public var monthSymbols: [String]! {
> get {
> var symbols = Array<String>()
> let cfSymbols = CFDateFormatterCopyProperty(_cfObject,
> kCFDateFormatterMonthSymbols) as! NSArray
> for obj in cfSymbols {
> symbols.append((obj as! NSString)._swiftObject)
> }
> return symbols
> }
> set {
> _reset()
> _monthSymbols = newValue
> }
> }
>
>
> Perhaps there is a more efficient way to make a CFArray into an
> Array<String>…
>
> Regards,
> Will Stanton
>
> > On Feb 26, 2016, at 7:25 PM, Taylor Franklin via swift-corelibs-dev <
> swift-corelibs-dev at swift.org> wrote:
> >
> > Although, all that is unrelated to my latest question of getting some of
> the NSDateFormatter properties their proper default values?
>
>
--
*Taylor Franklin*
iOS Developer | IBM Mobile Innovation Lab
972-207-2051 | taylorleefranklin at gmail.com
*Blog*: http://taylorfranklin.me | *LinkedIn*:
https://www.linkedin.com/in/taylorfranklin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20160227/4abf5a07/attachment.html>
More information about the swift-corelibs-dev
mailing list