bibtex.py: Update date format in generated bibtex
In https://gitlab.softwareheritage.org/swh/devel/swh-indexer/-/blob/master/swh/indexer/bibtex.py?ref_type=heads (l. 109).
Example of generated BibTeX:
@softwareversion{REPLACEME,
author = "Di Cosmo, Roberto and Danelutto, Marco",
organization = "Inria and University Paris Diderot and University of Pisa",
license = "LGPL-2.0-only",
date = "2011-07-18",
year = "2011",
month = "07",
repository = "git+https://github.com/rdicosmo/parmap.git",
title = "Parmap",
version = "1.2.5"
}
Roberto: [...] normalement si on a un champ "date" il n'est pas nécessaire de ajouter aussi "year" et "month" parce-que c'est redondant, mais si on les ajoute, pour compatibilité avec les vieux styles il convient de utiliser pour "month" dans BibTeX les littérales: jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec (ce sont des macros, donc pas de " ou {}, par ex: month=jan,).
However, the current library (pybtex
) does not allow generating macros.
- Should we switch lib?
- Should we leave it as is?
- Is it better if we use another format for
month
(https://www.bibtex.com/f/month-field/) which is not a macro? Let's say, a number (e.g.month = 2
).
Edited by Hélène Jonin