Uploaded image for project: 'Swift'
  1. Swift
  2. SR-1325

NSDateFormatter doesn’t include prepositions in some languages

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Foundation
    • Labels:
      None
    • Environment:

      swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a-ubuntu14.04

      Description

      Looks like NSDateFormatter doesn’t include prepositions in some languages.
      For example using this code in the version of Swift included in Xcode 7.3 (using Apple NSFoundation) returns dimarts, 26 d’abril de 2016 in Catalan:

      let f = NSDateFormatter()
      f.locale = NSLocale(localeIdentifier: "ca")
      f.dateStyle = .FullStyle
      f.stringFromDate(NSDate())
      

      Instead, using the open source foundation implementation it returns dimarts, 26 abril de 2016. (note the missing “d’” before the month).

      let f = NSDateFormatter()
      f.locale = NSLocale(localeIdentifier: "ca")
      f.dateStyle = .FullStyle
      f.string(from:NSDate())
      

      dimarts, 26 d’abril de 2016
      dimarts, 26 abril de 2016

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alexito4 Alejandro Martínez Pomes
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: