Page 1 of 1

GetDate() bug un Amiga

Posted: Mon Mar 02, 2020 6:09 pm
by Juan Carlos
The instrucción date$ = GetDate([type]) has a strange way of work, in Windows the correct when you pass the date$=GetDate() in Windows you get day/month number string/year full with four number example 02/03/2020 but this instruction under Amiga 68k and MorphOS you get 02/mar/20 the month in letters and the year only two numbers, even if you added the parameter #DATELOCALNATIVE under Windows works fine but under Amiga works like #DATELOCAL.

Re: GetDate() bug un Amiga

Posted: Mon Mar 02, 2020 10:29 pm
by airsoftsoftwair
Not a bug. #DATELOCALNATIVE is the default and delivers the date in the operating system's default format. If you want it locale-independent, use #DATELOCAL instead.

Re: GetDate() bug un Amiga

Posted: Tue Mar 03, 2020 10:55 am
by Juan Carlos
No, in Amiga systems both parameters hace the same results in Windows you have the two results as you say in the guide and manual.
I want in Amiga get the date with 03/03/2020 like Windows not only 03-Mar-2020 with both parameters.

Re: GetDate() bug un Amiga

Posted: Sat Mar 07, 2020 11:12 pm
by airsoftsoftwair
Juan Carlos wrote: ↑Tue Mar 03, 2020 10:55 am No, in Amiga systems both parameters hace the same results in Windows you have the two results as you say in the guide and manual.
I want in Amiga get the date with 03/03/2020 like Windows not only 03-Mar-2020 with both parameters.
There is no way to get 03/03/2020 on Amiga, it is locale-dependent. On Windows it will be different too, e.g. on a German system you get 03.03.2020 for #DATELOCALNATIVE. The only way to have a locale-independent implementation is to use #DATELOCAL. If you don't like the format returned by #DATELOCAL, use ParseDate() to convert it to a different format. It's really easy to convert #DATELOCAL's result to dd/mm/yyyy...

Re: GetDate() bug un Amiga

Posted: Sun Mar 08, 2020 8:19 pm
by Juan Carlos
Thanks for the answer is that manual isn't clear this issue.

Re: GetDate() bug un Amiga

Posted: Fri Mar 20, 2020 5:28 pm
by Juan Carlos
For example like GetDate() doesn't work correcto os impossible to use the CompareDates() because It gives error to comparativo. :?:

Re: GetDate() bug un Amiga

Posted: Sat Mar 21, 2020 12:34 pm
by airsoftsoftwair
Well, of course CompareDates() can only be used with dates in the format as returned by #DATELOCAL.