More PHP date weirdness, this time in the Cargo extension for MediaWiki:
+ // 'o' is better than 'Y' because it does not add leading
+ // zeroes to years with fewer than four digits.
+ // For some reason, though, this fails for some years -
+ // returning one year lower than it's supposed to - unless you
+ // add the equivalent of 3 days or more to the number of
+ // seconds. Is that a leap day thing? Weird PHP bug? Who knows.
+ // Anyway, it's easy to get around.
+ $yearString = date( 'o', $seconds + 300000 );