News: Beiträge, Anzeigedauer und öffentliche Seitenansicht
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ad0b08f32a
commit
434bab0b7a
4 files changed
+317
-2
No files matched your search
@@ -20,7 +20,7 @@ const wallFormat = new Intl.DateTimeFormat('en-US', {
|
||||
})
|
||||
|
||||
// Kalendertag (YYYY-MM-DD) in Deutschland
|
||||
const berlinDay = (date) => dayFormat.format(new Date(date))
|
||||
export const berlinDay = (date) => dayFormat.format(new Date(date))
|
||||
|
||||
// Reine Kalendertage rechnen wir als UTC-Mitternacht, damit Sommer-/Winterzeit keine Rolle spielt
|
||||
const dayToDate = (ymd) => new Date(`${ymd}T00:00:00Z`)
|
||||
@@ -88,7 +88,7 @@ function berlinOffset(t) {
|
||||
}
|
||||
|
||||
/** Zeitpunkt "Tag ymd, Uhrzeit in Deutschland" als Date (die Zeitumstellung liegt nie auf den genutzten Uhrzeiten). */
|
||||
function berlinTime(ymd, hour, minute = 0, second = 0, ms = 0) {
|
||||
export function berlinTime(ymd, hour, minute = 0, second = 0, ms = 0) {
|
||||
const [y, mo, d] = ymd.split('-').map(Number)
|
||||
const wall = Date.UTC(y, mo - 1, d, hour, minute, second, ms)
|
||||
const guess = wall - berlinOffset(wall)
|
||||
|
||||
Reference in new issue
Block a user