Xcode模板<< date >>格式

Soo*_*uNe 4 xcode templates xcode-template

我正在编写一个自定义的Xcode模板,我想改变<<date>>格式化的方式.

例如:

//  Created by «FULLUSERNAME» on «DATE».
//  Copyright «YEAR» «ORGANIZATIONNAME». All rights reserved.
Run Code Online (Sandbox Code Playgroud)

如果今天创建的文件将填写为:

//  Created by SooDesuNe on 2/24/2010.
//  Copyright 2010 MyOrganization. All rights reserved.
Run Code Online (Sandbox Code Playgroud)

以任何"所有数字"格式格式化的日期会引起很多混淆,因为ISO和JIS编写相同日期的方式是24/2/2010.这个月的第24天很清楚,但在本月的前12天不太清楚.

我想要x代码填充<<date>>像:

//  Created by SooDesuNe on 24-Feb-2010.
//  Copyright 2010 MyOrganization. All rights reserved.
Run Code Online (Sandbox Code Playgroud)

因为这种方式没有歧义.有谁知道如何更改日期格式?

Nic*_*ley 9

defaults write com.apple.dt.xcode AppleICUDateFormatStrings '{ 1 = "d-MMM-y"; }'
Run Code Online (Sandbox Code Playgroud)


小智 6

您可以更改系统首选项中显示的时间的短格式,然后重新启动 xcode,默认日期格式将被更改