@tekkare/romulus 0.1.135 → 0.1.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
|
@@ -161,7 +161,9 @@ async function write() {
|
|
|
161
161
|
range: 'all',
|
|
162
162
|
sections: [],
|
|
163
163
|
columns: [],
|
|
164
|
-
|
|
164
|
+
// Sans ce drapeau la page de garde taisait les sources, meme
|
|
165
|
+
// fournies : le generateur ne les imprime que si on les demande.
|
|
166
|
+
options: ['sources'],
|
|
165
167
|
fileName: stampedName.value,
|
|
166
168
|
layout: '',
|
|
167
169
|
schedule: 'once',
|
|
@@ -11,8 +11,10 @@ function longDate(lang) {
|
|
|
11
11
|
day: "numeric"
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
+
const ISO_DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
14
15
|
function sourceDate(source, lang) {
|
|
15
16
|
if (!source.date) return null;
|
|
17
|
+
if (typeof source.date === "string" && !ISO_DATE.test(source.date)) return source.date;
|
|
16
18
|
const parsed = new Date(source.date);
|
|
17
19
|
if (Number.isNaN(parsed.getTime())) return String(source.date);
|
|
18
20
|
return parsed.toLocaleDateString(lang === "en" ? "en-US" : "fr-FR", {
|