4

The basic settings for the menu bar datetime allows me to pick between 12/24h and add the date.

The internationalisation tab in the preferences allows me to define the short, medium, long, full time formats that osx uses.

None of these settings seem to allow me to alter the default date format (day of week name, day of month, month name) to include other values. Most specifically I want to add the week of year to this presentation.

Where is this format defined?

3

The clock display format is found in the Date & Time preference, the Clock tab. You can note there is no way to add the week of the year.

There is a partial solution, see Week numbers in Mac OS X, wherein there are instructions for adding the week of the year to the full date format in the Languages & Region preference pane, Advanced, Dates tab. There after you can click on the time or clock display in the tool bar and the first line of the pull down menu will display the full date including the week of the year. When modifying the format you can also add a space or other separators and annotation.

There may well be an impact for automated uses of the full date.

This was done by appending the week of the year followed by an added space to the beginning of the existing full date:

Week showing up in date, clock pull down menu

Addendum

After the questioner commented he was after something more direct I searched, found the format isn't fixed in a plist file (didn't modify a plist file after changing the Clock preferences), so I searched even wider.

See the Day-O app, where you can add the week to the preferences:

Day-O preferences

(The trailing space and 'w').

Which gives you a menu bar display of:

Day-0 menu bar display

You can un-click Show Icon to remove the preceding icon with the day of the month in it. You can also turn off the tool bar clock in Date & Time Preferences by un-clicking 'Show date and time in menu bar' to turn off the Apple clock display.

And setting the Day-O preferences to

new Day-0 preferences

gives:

Day-O display new pref

back to tinkering with Apple's menu bar clock:

You can read the clock format preferences by

$> defaults read com.apple.menuextra.clock
{
DateFormat = "EEE d MMM h:mm:ss a";
FlashDateSeparators = 0;
IsAnalog = 0;
}

Trying to set the format to include the week of the year (as a preceding element followed by a space):

$> defaults write com.apple.menuextra.clock "DateFormat" 'ww EEE d MMM h:mm:ss a'

doesn't do anything besides updating the plist file (~/Library/Preferences/com.apple.menuextra.clock.plist). I also tried several variations (such as adding the time zone).

$> defaults read com.apple.menuextra.clock
{
DateFormat = "ww EEE d MMM h:mm:ss a";
FlashDateSeparators = 0;
IsAnalog = 0;
}

And from this we can infer there's something procedurally wrong, either this is the wrong place to set the format or something has to occur afterwards or some combination.

The change disappears after a logout or a restart.

Needs more research.

| improve this answer | |
  • 1
    This is a fair workaround, I would however still like to find the underlying configuration that define the format that is available without clicking. There has to be some setting in some deeply hidden file that contains this. – Arvid Dec 12 '14 at 21:09
  • With Day-O I think we get as close as we can get here. Too bad the dev is not going to update it to Yosemite so in dark mode it's basically useless. Great answer overall, looks to me to be as far as you can get. – Arvid Feb 13 '15 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.