Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要设置自己的自定义月份和 DOW 名称NSDateFormatter才能解析NSDate为NSString. 是否可以将具有自定义名称的数组设置为日期格式化程序?
NSDateFormatter
NSDate
NSString
查看NSDateFormatter. 使用setMonthSymbols:orsetShortMonthSymbols:方法(以及其他需要的类似方法)。
setMonthSymbols:
setShortMonthSymbols:
这将适用于将 an 转换为NSDate结果NSString中您想要的任何自定义月份名称和星期几名称。