[data/C/books-and-ebooks/0002-fedora-defensive-coding.json] date field isn't applied from the JSON file to the README.md
Author: ghostCreated May 24, 2019Updated May 24, 2019
After running src/compiler.php the date is ignored:
$ grep -r date data/C/books-and-ebooks/0002-fedora-defensive-coding.json
"date": "2012",- README.md:
- * [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)- src/Util.php:
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"
- Notes:
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.
Source: paragonie/awesome-appsec