# I repeat, the string to convert must match the system settings.
try
set aString to "31 12 1943"
date aString
log result (*date "vendredi 31 décembre 1943 00:00:00"*)
on error
log "The string doesn't match the current format : " & date string of (current date)
end try
try
set aString to "31/12-43"
date aString
log result (*date "jeudi 31 décembre 2043 00:00:00"*)
on error
log "The string doesn't match the current format : " & date string of (current date)
end try
try
set aString to "12/31/1943"
date aString
log result
on error
log "The string doesn't match the current format : " & date string of (current date)
end try
try
set aString to "12/31-43"
date aString
log result
on error
log "The string doesn't match the current format : " & date string of (current date)
end try
log "Now surprising behavior. If somebody may explain it, I'm interested."
try
set aString to "12 31/1943"
date aString
log "???? " & result (*???? vendredi 13 mars 2015 12:31:00*)
on error
log "The string doesn't match the current format : " & date string of (current date)
end try
try
set aString to "12 31 1943"
date aString
log "???? " & result (*???? vendredi 13 mars 2015 12:31:00*)
on error
log "The string doesn't match the current format : " & date string of (current date)
end try
On the system used in French, lhe events log is :
(*date vendredi 31 décembre 1943 00:00:00*)
(*date jeudi 31 décembre 2043 00:00:00*)
tell current application
current date
(*The string doesn't match the current format : vendredi 13 mars 2015*)
current date
(*The string doesn't match the current format : vendredi 13 mars 2015*)
(*Now surprising behavior. If somebody may explain it, I'm interested.*)
(*???? vendredi 13 mars 2015 12:31:00*)
(*???? vendredi 13 mars 2015 12:31:00*)
end tell
It will be different on system running in English.
Yvan KOENIG (VALLAURIS, France) vendredi 13 mars 2015 21:11:24