Wrong Ordering with non-compliant date
Posting last night, I noticed that if I use the date format 2013-09-2, Dropplets doesn't parse the date correctly, and displays posts out of (chronological) order.
Changing the date to 2013-09-02 solved the problem. Perhaps we could look into adding slight changes to the way the date is read to fix for lazy folks (like I can be)?
While I'm happy to remember to fix my dates and be less lazy, others might not be.
Hence why I didn't post in the discussion about compliant dates.
I see your non point about non compliance, and raise you tumblr... most blogs there aren't compliant with the famous 'No Geocities Design Atrocities Act' of 2005!
The date parsing is done by PHP's date_create on line 94 of index.php.
What happens if instead of 2013-09-2 you put 2013-9-2?
I like to write dates like 01-90-3102, But the standard still remains ISO8601. I don't see any reason of adding such functionality to Dropplets.
Quite - the difference is that that's an impossible date - an edge case if you will. Only a few have a fetish for a date that's purposefully non conformant.
Most people, I'd wager, aren't aware there is a fixed standard for writing a date, and no amount of telling will make them do it the specified way.
Is it a case of you must write it one magic way, or is a slightly more tolerant approach a valid thing to consider?
Yes - I'll give you that allowing tolerance for mistakes at every issue will lead to bloated and slow code, but it can also lead to a much better overall user experience.
Currently I've not been able to recreate the issue, but I've not had too much time to actually try - I'll have a fiddle and get back.
If you want to change how the ISO8601 date is displayed in your theme, you can use the PHP date format variables to change what $date_format is set to in /dropplets/settings.php.
Hi,
i just found out that the ordering is also wrong even with good date format... Post more on the same day (or with the same date), and you will see that the posts will display in REVERSED alphabetical order... I named manually my md files starting with numbers, and the last number was the first on the index page...
I hope somebody will find out how can we fix it... Maybe we should add the time (hh:mm) after the date in the Markdown file, but making it unvisible. Renaming the files is not a solution since the direct link is the name of the file.
I opened a new issue regarding this problem, feel free to discuss it there. https://github.com/circa75/dropplets/issues/246
