Will SetDate and Date be able to use the date format set in locale too, or will it--for consistency reason--force everybody using the shell to use a foreign format?
Why "will"? Date and Setdate use StrToDate from the dos.library, and this function is patched over by the locale.library since a long time. It accepts input in the current locale since WB 2.1, I would say.
Mmh.. it does not here. Locale is set to Denmark, Workbench shows the date in format YYYY/MM/DD. The shell shows in format DD-MMM-YY.
6. Ram Disk:> date
Lørdag 14-Dec-19 16:56:49
6. Ram Disk:> setdate testfile.txt 2019/06/14
SetDate failed: Invalid DATE of TIME string!
It talkes back half Danish, half English btw, even tho the preferred language is Danish
I changed locale "country" to use Austria, "preferred language to Deutsh": Workbench displays YYYY-MM-DD for a folder with the option "Show by name" format. A new shell still shows DD-MMM-YY.
6. Ram Disk:> date
Samstag 14-Dez-19 17:01:27
6. RAM Disk:> date 2019-12-13
***Bad args
- use DD-MMM-YY or <dayname> or yesterday etc. to set date
HH:MM:SS OR HH:MM to set time
And here too, it speaks with me in English not in Austrian (granted 3.1 didn't do it either)
Version c:date 37.2, version c:Setdate 37.1. Verified if it's the same version on the Workbench3.1.4 disk.
I tried the above, starting from OS 2.1 up to OS4.1FE Update 1
The latter is the only OS accepting the date format as set in locale.
Can you confirm this or show me how to do it correctly? Thanks!
