GetDate() bug un Amiga

Find quick help here to get you started with Hollywood
Post Reply
User avatar
Juan Carlos
Posts: 932
Joined: Mon Sep 06, 2010 1:02 pm

GetDate() bug un Amiga

Post 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.
User avatar
airsoftsoftwair
Posts: 5834
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: GetDate() bug un Amiga

Post 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.
User avatar
Juan Carlos
Posts: 932
Joined: Mon Sep 06, 2010 1:02 pm

Re: GetDate() bug un Amiga

Post 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.
User avatar
airsoftsoftwair
Posts: 5834
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: GetDate() bug un Amiga

Post 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...
User avatar
Juan Carlos
Posts: 932
Joined: Mon Sep 06, 2010 1:02 pm

Re: GetDate() bug un Amiga

Post by Juan Carlos »

Thanks for the answer is that manual isn't clear this issue.
User avatar
Juan Carlos
Posts: 932
Joined: Mon Sep 06, 2010 1:02 pm

Re: GetDate() bug un Amiga

Post by Juan Carlos »

For example like GetDate() doesn't work correcto os impossible to use the CompareDates() because It gives error to comparativo. :?:
User avatar
airsoftsoftwair
Posts: 5834
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: GetDate() bug un Amiga

Post by airsoftsoftwair »

Well, of course CompareDates() can only be used with dates in the format as returned by #DATELOCAL.
Post Reply