我正在编写一个自定义
Xcode模板,我想改变方式<< date>>格式化.
例如:
// Created by «FULLUSERNAME» on «DATE». // Copyright «YEAR» «ORGANIZATIONNAME». All rights reserved.
如果今天创建的文件将填写为:
// Created by SooDesuNe on 2/24/2010. // Copyright 2010 MyOrganization. All rights reserved.
以任何“所有数字”格式格式化的日期会引起很多混淆,因为ISO和JIS编写相同日期的方式是24/2/2010.这个月的第24天很清楚,但在本月的前12天不太清楚.
我希望x-code填充<< date>>喜欢:
// Created by SooDesuNe on 24-Feb-2010. // Copyright 2010 MyOrganization. All rights reserved.
因为这种方式没有歧义.有谁知道如何更改日期格式?
解决方法
defaults write com.apple.dt.xcode AppleICUDateFormatStrings '{ 1 = "d-MMM-y"; }'