realbasic-nug
[Top] [All Lists]

Re: parseDate replacement

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: parseDate replacement
From: Norman Palardy <npalardy at great-white-software dot com>
Date: Mon, 30 Apr 2007 12:47:29 -0600
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <20074301737171965171 dot realbasic at garman dot demon dot co dot uk>
On 30-Apr-07, at 11:37 AM, Steve Garman wrote:

> I have a function I intend to use when parseDate returns false or  
> produces
> a date too far in the past.
>
> The idea is that this should work in as many Gregorian calendar
> circumstances as possible.
>
> So far it is working on all the machines where I have tested it but  
> I am
> sure that I have missed all sorts of possible circumstances.
>
> It would be a great help to me if anyone willing would try the  
> function on
> as many platforms/locales as possible and let me know any problems,
> suggested improvements, etc.
>
> I have posted the code at
> <http://rb.sgarman.net/validDate.php>
>
> Thanks for any help.

An FYI
This definitely only works properly in 2007
205r4 and 2006r4 do not respect the international settings properly.
Getting the short date back returns me the date with the parts in the  
right order but not the correct custom separator (I have my date  
format set to mm;yy;dd)

But since parse date "works" in those versions this is not an issue

You could even preface the code with

   #if RBVersion < 2007
     return parseDate(text, value)

   #else
    // ...... your code here

   #endif

and have a universal replacement
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>