After running src/compiler.php the date is ignored:
$ grep -r date data/C/books-and-ebooks/0002-fedora-defensive-coding.json
"date": "2012",
- * [Defensive Coding: A Guide to Improving Software Security by the Fedora Security Team](#defensive-coding-a-guide-to-improving-software-security-by-the-fedora-security-team-2018) (2018)
+ * [Defensive Coding: A Guide to Improving Software Security by the Fedora Security Team](#defensive-coding-a-guide-to-improving-software-security-by-the-fedora-security-team-2019) (2019)
if (!empty($fd['date'])) {
$dt = new \DateTime($fd['date']);
$header .= ' ('.$dt->format('Y').')';
}
Instead of just using the year, it seems working when date matches the pattern "YYYY-MM"
https://github.com/paragonie/awesome-appsec/blob/master/data/C/books-and-ebooks/0002-fedora-defensive-coding.json#L2
OK: Four digit year and month (GNU) YY "-" mm "2008-6", "2008-06", "1978-12"
NOK: Year (and just the year) YY "1978", "2008"
https://www.php.net/manual/pt_BR/datetime.construct.php#123882
https://www.php.net/manual/pt_BR/datetime.construct.php#119591
https://www.php.net/manual/en/datetime.formats.date.php)
Include optional fields and examples.