> > I roll my own. I could never get these to insert leading zeroes.
>
>   really? well.. you *should* be fine with code like this:
>
> ---
> {
>   Char                  time[20];
>   DateTimeType          date;
>   SystemPreferencesType systemPrefs;              // clock variables
>
>   // get the current date/time
>   TimSecondsToDateTime(TimGetSeconds(), &date);
>
>   // get the users preferences
>   PrefGetPreferences(&systemPrefs);
>
>   // format the time to the localized preference
> #ifdef DATE
>   DateToAscii(date.month, date.day, date.year,
>       systemPrefs.longDateFormat, time);
> #else
>   TimeToAscii(date.hour, date.minute,
>       systemPrefs.timeFormat, time);
> #endif
> }
> ---
>
>   that way, you map to the user's preferences.. let them decide
>   if they have leading zero's or not. you can tweak the rest..

The preferences do not support leading zeros. And you would want them  in
lists, regardless of preferences.

But you do have a point. I guess the best solution is to use the PalmOS
routines, and insert leading zeroes as necessary.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to