Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


thanks :) | 14 comments | Create New Account
Click here to return to the 'thanks :)' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
thanks :)
Authored by: trevden on Nov 26, '01 08:33:39PM

There's a hardcoded string ("%a ") in the Clock binary that, when fed to the equivalent of strftime(), produces the day of week string. The one-line perl script just changes the only occurrence of "%a " to "%x ", which instead produces the long date string you end up seeing.

Unfortunately, because the string is hard-coded, you can't make it any longer, so you're limited to three characters, or only one date macro. %x is by far the most useful. %e will produce only the day of the month, which might also be useful to you, though it looks a little odd.

The AM/PM text can be changed to a single macro in a similar manner. (If you're interested, go edit the binary by hand, don't try to perl it. :)

Eden




[ Reply to This | # ]
Great menu tip!
Authored by: RichB on Dec 05, '01 01:43:47AM

Thanks for something that was always missing from OS 9! I hated having to click the time just to see the date. Desktop Calendar is nice but usually hidden behind open windows.

To conserve valuable menu bar real estate I have gone to the really abbreviated day of the month format (%e). The day number toggles on and off with the preference setting for "Show day of the week" as expected. It would be nice to also see the day of the week. I don't understand why the weekday doesn't show with this date macro.

In other words, originally it was "Tues 11:00" and then with changing %a to %x it became "Tues Dec 04 2001 11:00". Now changing %x to %e it is simply "4 11:00". It seems odd the weekday is included with %x.



[ Reply to This | # ]