fix: show population reference date
Deploy / scheduled-rebuild-dev (push) Skipped
Deploy / scheduled-rebuild-master (push) Skipped
Deploy / rollback-dev (push) Skipped
Deploy / rollback-master (push) Skipped
Deploy / validate-dispatch (push) Successful in 1s
Deploy / changes (push) Successful in 5s
Deploy / app-quality (push) Successful in 1m36s
Deploy / secret-scan (push) Successful in 6s
Deploy / security-deps (push) Successful in 6s
Deploy / context (push) Successful in 2s
Deploy / app-image (push) Successful in 1m3s
Deploy / deploy-master (push) Skipped
Deploy / deploy-dev (push) Successful in 12s
Deploy / scheduled-rebuild-dev (push) Skipped
Deploy / scheduled-rebuild-master (push) Skipped
Deploy / rollback-dev (push) Skipped
Deploy / rollback-master (push) Skipped
Deploy / validate-dispatch (push) Successful in 1s
Deploy / changes (push) Successful in 5s
Deploy / app-quality (push) Successful in 1m36s
Deploy / secret-scan (push) Successful in 6s
Deploy / security-deps (push) Successful in 6s
Deploy / context (push) Successful in 2s
Deploy / app-image (push) Successful in 1m3s
Deploy / deploy-master (push) Skipped
Deploy / deploy-dev (push) Successful in 12s
This commit is contained in:
@@ -70,7 +70,8 @@ function SpecialContent({ type }: { type?: string }) {
|
||||
return <figure className="coat-of-arms"><Image src="/images/goldebek-wappen.svg" alt="Offizielles Wappen der Gemeinde Goldebek" width={150} height={164} /><figcaption>Das Gemeindewappen wird unverändert wiedergegeben.</figcaption></figure>;
|
||||
}
|
||||
if (type === "facts") {
|
||||
return <dl className="data-grid"><div><dt>Einwohner</dt><dd>{municipalityJson.population.value}</dd></div><div><dt>Fläche</dt><dd>{municipalityJson.areaKm2.toLocaleString("de-DE")} km²</dd></div><div><dt>Dichte</dt><dd>{municipalityJson.population.densityPerKm2} Einwohner/km²</dd></div><div><dt>Postleitzahl</dt><dd>{municipalityJson.postalCode}</dd></div><div><dt>Amt</dt><dd>{municipalityJson.administration}</dd></div></dl>;
|
||||
const populationReferenceDate = new Intl.DateTimeFormat("de-DE", { day:"2-digit", month:"2-digit", year:"numeric", timeZone:"Europe/Berlin" }).format(new Date(`${municipalityJson.population.referenceDate}T12:00:00Z`));
|
||||
return <dl className="data-grid"><div><dt>Einwohner</dt><dd>{municipalityJson.population.value}</dd><small>Stand {populationReferenceDate}</small></div><div><dt>Fläche</dt><dd>{municipalityJson.areaKm2.toLocaleString("de-DE")} km²</dd></div><div><dt>Dichte</dt><dd>{municipalityJson.population.densityPerKm2} Einwohner/km²</dd></div><div><dt>Postleitzahl</dt><dd>{municipalityJson.postalCode}</dd></div><div><dt>Amt</dt><dd>{municipalityJson.administration}</dd></div></dl>;
|
||||
}
|
||||
if (type === "history") {
|
||||
return <><p className="timeline-hint">Beim Scrollen rückt jeweils eine Station in den Mittelpunkt.</p><HistoryTimeline items={municipalityJson.history} /></>;
|
||||
|
||||
Reference in New Issue
Block a user