Question

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?

Was it helpful?

Solution

defaults write com.apple.dt.xcode AppleICUDateFormatStrings '{ 1 = "d-MMM-y"; }'

OTHER TIPS

You can just change your short format of your time displaying in system preferences., then restart xcode, the default date format will be changed

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top