JavaScript Copyright Year Query
import { PGlite } from "@electric-sql/pglite"; const pg = await PGlite.create(); const results = await pg.query("select date_part('year', now()) as year;"); const year = results[0].year document.querySelector("#footer .copyright > .year").textContent = year;
A dark code editor window shows JavaScript using PGlite to query the current year from a PostgreSQL database and insert it into a website footer’s copyright element. The joke is that a simple copyright year update is handled with an elaborate database query and asynchronous code, humorously overengineering a trivial task.
- @ithueti / 14970 2025-01-04
- Type
- image
- Size
- 800×336 · 27.8 KiB
- Mood
- sarcastic
- Language
- en
- Added