[Gambas-user] Bug with IsDate

Jussi Lahtinen jussi.lahtinen at gmail.com
Tue Dec 15 16:52:01 CET 2020


Here isdate(str(now)) still returns false. And str(now) returns "12/15/2020
05:50:05 PM".

Jussi


On Sat, Dec 12, 2020 at 6:42 PM Benoît Minisini <g4mba5 at gmail.com> wrote:

> Le 08/12/2020 à 19:13, Jussi Lahtinen a écrit :
> > Currently in dev version IsDate does not understand the localization:
> > ? IsDate(Str(Now))
> > False
> >
> > $ locale
> > LANG=en_US.UTF-8
> > LANGUAGE=en_US
> > LC_CTYPE="en_US.UTF-8"
> > LC_NUMERIC=fi_FI.UTF-8
> > LC_TIME="en_US.UTF-8"
> > LC_COLLATE="en_US.UTF-8"
> > LC_MONETARY=fi_FI.UTF-8
> > LC_MESSAGES="en_US.UTF-8"
> > LC_PAPER=fi_FI.UTF-8
> > LC_NAME=fi_FI.UTF-8
> > LC_ADDRESS=fi_FI.UTF-8
> > LC_TELEPHONE=fi_FI.UTF-8
> > LC_MEASUREMENT=fi_FI.UTF-8
> > LC_IDENTIFICATION=fi_FI.UTF-8
> > LC_ALL=
> >
> >
> > Jussi
> >
> >
> > ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> >
>
> It should be fixed in commit
>
> https://gitlab.com/gambas/gambas/-/commit/93659c3f7eab356b922d5be161990bf888fb3fd8
> .
>
> Now Str() on dates returns something that Val() and IsDate() can
> understand.
>
> A function that could be named "Date.FromString()" should be made for
> understanding any local date in any format. Val() and IsDate() cannot be
> made clever enough for that, too complex!
>
> Regards,
>
> --
> Benoît Minisini
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20201215/89f629d9/attachment.htm>


More information about the User mailing list