System Date/Time Format Problems

Pete pete at mollysrevenge.com
Sat Jul 2 15:46:46 EDT 2011


Thanks Jacque.  You may have missed the original post in this thread, so
here's a quick recap.

I want the user to be able to set a preference that he/she wants his
dates/times/displayed in any of the OS X formats of short, medium, long, and
full that are set in the OS X System Prefernces.  The problem is that the
Livecode system date formats don't fully reflect the system preference
settings on OS X (don't know about Windows).  Some of that is because OS X
has four date/time formats and LC only has three, but there's at least one
instance where LC returns a date that is not in any of the OS X date
formats.  Here's a summary of what happens on my Mac running OS X 10.6.8:

For dates:
LC Short = OSX Short
LC Long = OSX Full
LC Abbrev = returns a date that is not in any of the OS X formats
no LC format for OSX medium or long


For times:
LC Short = OSX Short
LC Abbrev = OSX Short
LC Long = OSX Medium
no LC format for OSX Long or full

So if a user tells me he wants his dates in OS X medium or long format, I
can't find out what that is with LC code, same for an OS X long time.  I'm
hoping I will be able get hold of all the date/time formats with a shell
command or with Applescript but no luck yet.  I may have to ask the user to
define the formats again with my ap ( that goes back to the other thread
about duplicate object names!)

Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Sat, Jul 2, 2011 at 9:37 AM, J. Landman Gay <jacque at hyperactivesw.com>wrote:

> On 7/2/11 11:16 AM, Pete wrote:
>
>  But Im still faced with the problem of figuring out what the user's System
>> Preference settings are for the short, medium, long, and full date and
>> time
>> formats.
>>
>
> You can get their preferred format by either setting the usesystemdate to
> true and then getting a date or time, or just by getting "the system date".
> Then all the LiveCode date formats will reflect the user preference. For the
> abbrev date, where the month is not fully expanded, a quick lookup in the
> monthnames would fix that. Just replace the abbreviated month name with the
> expanded one.
>
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
>
>
> ______________________________**_________________
> 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<http://lists.runrev.com/mailman/listinfo/use-livecode>
>
>



More information about the use-livecode mailing list