Using CCK 2.1, Views 2.1, and Date 2.x-dev, I have encountered a problem in the output of the date.
Through CCK, I have added a datestamp field and set the default diplay to a custom value of F nS, Y g:ia
which should output something similar to "January 23rd, 2008 12:23pm". Then, through the Views UI, I have chosen to output the datestamp field using the Default formatting.
The output of this field has an extra ordinal suffix at the end of the string resulting in something similar to "November 11th, 2008 4:11pm th" (notice the extra th at the end).
To the best of my knowledge, this problem exists with every field type (date, datestamp, datetime).
Comments
Comment #1
KarenS CreditAttribution: KarenS commentedI never used 'S' before, I didn't even know what it would do :)
I adjusted the formatting to handle the ordinal correctly.
Comment #2
ultimateboy CreditAttribution: ultimateboy commentedHumm. Just gave the newest dev a try and now I am getting errors when attempting to output a date field through views:
warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/stanford/sites/all/modules/contrib/date/date/date.module on line 696.
In the views' output the date appears, but the extra ordinal suffix is still at the end of the string.
Comment #3
KarenS CreditAttribution: KarenS commentedAre you sure you got my commit? I just made it and it isn't in the tarball yet. The only way you could have the fix is if you're getting your code directly from cvs. The foreach() error was in the older code too and is fixed in cvs, so I suspect you don't have the latest code yet. All those fixes will get into the next tarball when it is rolled (I think the tarballs are updated at midnight and noon, UTC).
Comment #5
Chris CharltonI assumed the "S" was a bug?