Sort Ascending DateTime - failure

Paul Hibbert paul at livecode.org
Sun Sep 11 23:29:59 EDT 2022


While playing around with the PolyGrid, I wanted to try adding sorting options by clicking the PolyGrid Header Labels. The solution I came up with drove me nuts until I discovered that there appears to be an issue associated with the sort command and dateTime.

According to the dictionary, text can be sorted by dateTime, and the entry for dateTime states…

"The dateTime keyword recognizes all LiveCode's date and time formats and sorts them in time order, rather than alphabetical or numeric order."

Date Formats:

the [{ long | abbreviated | short }] [{ english | system }] date

…So I was expecting to be able to sort the PolyGrid by the dates as entered, because they are set to the same format as the system date on my Mac, however, sorting by dateTime fails (on my Mac) when the system is set to use dashes as date separators. e.g.: 11-09-2022, it works fine with any other format. e.g.: 11/09/2022

I know that I can work around this fairly easily, but I see this as a bug. Before I report it, I figured it would be best to ask here if anyone else has come across this, or am I missing something? Seems like this should have been caught a long time ago.

macOS Monterey
Version 12.5.1
LiveCode 9.6.8 & 10.0.0 (dp 4)

Paul


More information about the use-livecode mailing list