相关疑难解决方法(0)

是否可以在NSDateFormatter的格式字符串中添加自定义文本?

假设我希望日期看起来像这样:

|1988|December|30|
Run Code Online (Sandbox Code Playgroud)

如何将这些添加到dateFormatter或者为此让格式如下:

30 in the month of December in the year of 1998
Run Code Online (Sandbox Code Playgroud)

现在是1988年,12月和30年,我想使用标准格式,但我希望我提出的文字也随之而来.

特别是在上述情况下,格式和管道只是在日期或月份的日期格式旁边,格式和管道之间没有空格.

只需设置格式就可以实现这一切吗?

objective-c nsdateformatter ios

31
推荐指数
2
解决办法
6917
查看次数

标签 统计

ios ×1

nsdateformatter ×1

objective-c ×1