with open('/var/www/html/undangan_digital/index.html', 'r') as f:
    html = f.read()

# Replace dates
html = html.replace("Ahad, 17 Agustus 2026", "Selasa, 26 Mei 2026")
html = html.replace("17 Agustus 2026", "26 Mei 2026")
html = html.replace("10 Agustus 2026", "15 Mei 2026")

# Replace footer
html = html.replace("© 2026 Undangan Digital Robert &amp; Jaenab · by H2SN", "© 2026 Robert &amp; Jaenab · Designed by H2SN")

with open('/var/www/html/undangan_digital/index.html', 'w') as f:
    f.write(html)

with open('/var/www/html/undangan_digital/script.js', 'r') as f:
    script = f.read()

script = script.replace("2026-08-17T09:00:00", "2026-05-26T08:00:00")

with open('/var/www/html/undangan_digital/script.js', 'w') as f:
    f.write(script)

print("Date and footer updated.")
