Xcode template << date >> format

I am working on a custom Xcode template, and I would like to change the formatting method <<date>> .

For instance:

 // Created by «FULLUSERNAME» on «DATE». // Copyright «YEAR» «ORGANIZATIONNAME». All rights reserved. 

if the file was created today, it will be populated as:

 // Created by SooDesuNe on 2/24/2010. // Copyright 2010 MyOrganization. All rights reserved. 

Dates formatted in any “all number” format can cause a lot of confusion, since the way to record ISO and JIS of the same date is 24/2/2010. This is clear on the 24th day of the month, but not so clear on the first 12 days of the month.

I would like x-code to populate <<date>> as:

 // Created by SooDesuNe on 24-Feb-2010. // Copyright 2010 MyOrganization. All rights reserved. 

Since there is no such ambiguity. Does anyone know how to change the date format?

+4
source share
2 answers
 defaults write com.apple.dt.xcode AppleICUDateFormatStrings '{ 1 = "d-MMM-y"; }' 
+7
source

You can simply change your short time display format in the system settings., Then restart xcode, the default date format will be changed

+4
source

Source: https://habr.com/ru/post/1302321/


All Articles