Priority: Low
Current State: Closed
Released In:
Target Release: patch
If I have the following table
%TABLE{sort="on"}%
| *label* | *date* |
| docs | 08/29/2009 |
| docs | 12/08/2009 |
| docs | 01/28/2009 |
| docs | 01/27/2009 |
an ascending sort should show
| docs | 01/27/2009 |
| docs | 01/28/2009 |
| docs | 08/29/2009 |
| docs | 12/08/2009 |
It does not. Instead 01/28/2009 comes before 01/27/2009
- screenshot - unexpected sort order:
- screenshot - desceinding works as expected:
--
VickiBrown - 08 Dec 2009
It looks like the documentation is wrong. TablePlugin uses the
Foswiki::Time
module. The code doc says:
Handles the following formats:
Default Foswiki format
* 31 Dec 2001 - 23:59
* 31-Dec-2001 - 23:59
Foswiki format without time (defaults to 00:00)
* 31 Dec 2001
* 31-Dec-2001
Date separated by '/', '.' or '-', time with '.' or ':'
Date and time separated by ' ', '.' and/or '-'
* 2001/12/31 23:59:59
* 2001.12.31.23.59.59
* 2001/12/31 23:59
* 2001.12.31.23.59
* 2001-12-31 23:59
* 2001-12-31 - 23:59
* 2009-1-12
* 2009-1
* 2009
ISO format
* 2001-12-31T23:59:59
* 2001-12-31T
ISO dates may have a timezone specifier, either Z or a signed difference
in hh:mm format. For example:
* 2001-12-31T23:59:59+01:00
* 2001-12-31T23:59Z
So it is either:
- dd Mmm yyyy
- dd-Mmm-yyyy
- yyyy-mm-dd
- yyyy.mm.dd
- yyyy/mm/dd
and not dd/mm/yyyy
I have improved the documentation.
--
ArthurClemens - 08 Dec 2009
Note also that we still have a sort bug
Item8302 - in case someone sees this report and think it is the same.
As a note about the date format. 12/08/2010 means 12th of August in most countries in this world. It is only US to my knowledge that puts things upside-down. And Foswiki is an international project with no obvious reason to let the US way be the right way. For this reason we have chosen not to implement either way. Instead we encourage using formats we all agree on. All the formats supported leave no doubt. 2010.08.12 is 12th of August. If these ISO like formats confuses use the more human dd Mmm YYYY. This also works in USA and is quite natural.
--
KennethLavrsen - 05 Jan 2010