views:

225

answers:

1

I'm working up a custom Xcode template, and I'd like to change the way <<date>> is formatted.

For example:

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

if the file was created today would fill as:

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

Dates formatted in any "all numbers" format can cause a lot of confusion, since the ISO and JIS way of writing the same date is 24/2/2010. It's 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>> like:

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

Since there is no ambiguity that way. Anyone know how to change the date format?

+3  A: 
defaults write com.apple.xcode AppleICUDateFormatStrings '{ 1 = "d-MMM-yyyy"; }'
Nicholas Riley
Copied that into the terminal, and created a new file from my template. But the date formate was still mm/dd/yy
SooDesuNe
You need to quit and restart Xcode.
Nicholas Riley
That got it, thanks!Where is that type of information documented?
SooDesuNe
Nicholas Riley