Content deleted Content added
DreamRimmer (talk | contribs) fixes |
DreamRimmer (talk | contribs) fix date parser Tag: Reverted |
||
Line 574:
if (timestampMatch) {
const timestampStr = timestampMatch[1];
const
const rfcDate = new Date(cleanTimestamp + ' UTC');
const now = new Date();
const daysDiff = Math.floor((now - rfcDate) / (1000 * 60 * 60 * 24));
Line 622 ⟶ 623:
html += `</select></p>`;
const defaultFilteredRfcs = rfcs.filter(rfc => rfc.daysOld <= defaultAge);
html += '<h4>All Current RfCs</h4><table class="wikitable sortable"><thead><tr><th>Topic</th><th>Title</th><th>Days Old</th><th>Started</th></tr></thead><tbody>';▼
rfcs.sort((a, b) => a.daysOld - b.daysOld).forEach(rfc => {▼
if (defaultFilteredRfcs.length > 0) {
▲ html +=
html += `<tr><td>${rfc.topic}</td><td><a href="${rfc.url}" target="_blank">${rfc.title}</a></td><td>${rfc.daysOld}</td><td>${rfc.timestamp}</td></tr>`;
});
html += '</tbody></table>';
} else {
html += `<p>No RfCs found that are ${defaultAge} days old or newer.</p>`;
}
Line 639 ⟶ 645:
html += `<tr><td>${topic}</td>`;
ageOptions.forEach(age => {
const count = rfcs.filter(rfc => rfc.topic === topic && !isNaN(rfc.daysOld) && rfc.daysOld <= age).length;
html += `<td>${count}</td>`;
});
Line 647 ⟶ 653:
ageOptions.forEach(age => {
const filteredRfcs = rfcs.filter(rfc => !isNaN(rfc.daysOld) && rfc.daysOld <= age);
const displayStyle = age === 7 ? 'block' : 'none';
html += `<div class="rfc-age-group" data-age="${age}" style="display: ${displayStyle};">`;
html += `<h4>RfCs ${age} days old or newer (${filteredRfcs.length} total)</h4>`;
if (filteredRfcs.length === 0) {
|