Date/Times/Number/Currency format preferences

Peter Haworth pete at mollysrevenge.com
Mon Feb 28 12:40:51 EST 2011


Thanks Bob.  I guess I'm still not sure how to use those keywords.

For example, let's say I have a date stored in a database as 2011-03-01 and I want to display that in accordance with the users preference setting (on a Mac).   Prowling around the dictionary, it looks like maybe if I convert the database date to be in dateitems format, I could use "convert myDate from dateitems to short system date" to do what I want.  and vice versa. Same for time format conversion.  Or is there a better way?


On the number Format, I don't think that helps me.  Seems like it just allows you to specify how many decimal places there should be in a number and doesn't use whatever is in the user's preferences to format it.  I need to get hold of the characters used to represent the decimal point, the thousands separator, and the currency symbol.  I suppose I can provide a way for the user to specify that within my app, just seems a waste when the info is, or should be, available from the OS preferences.

Pete Haworth

On Feb 28, 2011, at 8:30 AM, Bob Sneidar wrote:

> the system time, the system date, the numberFormat.  
> 
> Bob
> 
> 
> On Feb 27, 2011, at 10:14 AM, Peter Haworth wrote:
> 
>> I would like to ensure that all dates, numbers, and currency values in my app are formatted according to the user's preferences in the  Format tab of the OSX Language and Text Preferences.  I found the dateFormat property that helps but haven't found anything in LC that helps with the other formats.  Does LC provide a way to get hold of those preferences or does anyone have an Applescript that will do it?
>> 
>> Pete Haworth
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 





More information about the use-livecode mailing list