Hwaro::Utils::SortUtils
Constants
Stand-in date for an undated page where a timestamp must be printed (feed <updated>); never used for ordering.
Instance methods
Compare two pages by date (newest first by default)
Uses updated date if available, then date. An undated page sorts after every dated one — including pre-1970 dates, which a 1970 stand-in date used to put below undated pages. Returns negative if a should come first, positive if b should come first
Like compare_by_date, but on the publish date alone: a revised post
(updated) keeps its place in a chronological archive (gh#865).
Compare two pages by title alphabetically (A-Z)
Compare two pages by weight value (lower weight first)
Compare two taxonomy term names alphabetically, ignoring case ("acp" < "SRI" < "Zola"); byte order breaks ties so "Go" and "go" still order deterministically.