Skip to content

Commit 5fd8c7c

Browse files
committed
move event date to env
1 parent ca0817c commit 5fd8c7c

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# para cerrar el c4p, dejar vacío
22
PUBLIC_CALL_FOR_PAPERS_OPEN=
3+
4+
PUBLIC_EVENT_START_DATE=2026-03-09
5+
PUBLIC_EVENT_END_DATE=2026-03-13

src/routes/+page.svelte

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,23 @@
99
import MetroMalaga from "$lib/components/icons/MetroMalaga.svelte";
1010
import Renfe from "$lib/components/icons/Renfe.svelte";
1111
12-
import { PUBLIC_CALL_FOR_PAPERS_OPEN } from "$env/static/public";
12+
import {
13+
PUBLIC_CALL_FOR_PAPERS_OPEN,
14+
PUBLIC_EVENT_START_DATE,
15+
PUBLIC_EVENT_END_DATE,
16+
} from "$env/static/public";
17+
18+
import { Temporal } from "temporal-polyfill-lite";
19+
20+
const startPlainDate = Temporal.PlainDate.from(PUBLIC_EVENT_START_DATE);
21+
const endPlainDate = Temporal.PlainDate.from(PUBLIC_EVENT_END_DATE);
22+
23+
const start = startPlainDate.toLocaleString("es", { day: "2-digit" });
24+
const end = endPlainDate.toLocaleString("es", {
25+
day: "2-digit",
26+
month: "long",
27+
});
28+
const year = endPlainDate.year;
1329
</script>
1430

1531
<svelte:head>
@@ -28,8 +44,8 @@
2844
<HackersWeekEdition height="1.13em" />
2945
</h1>
3046
<h2>
31-
<time datetime="2026-03-09">09</time> -
32-
<time datetime="2026-03-13">13 de Marzo 2026</time>
47+
<time datetime={PUBLIC_EVENT_START_DATE}>{start}</time> -
48+
<time datetime={PUBLIC_EVENT_END_DATE}>{end} {year}</time>
3349
</h2>
3450
<nav>
3551
<a href="#schedule">

src/routes/colaborar/+page.svx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,20 @@ layout: main
55
---
66

77
<script lang="ts">
8-
import { PUBLIC_CALL_FOR_PAPERS_OPEN } from "$env/static/public";
8+
import { PUBLIC_CALL_FOR_PAPERS_OPEN, PUBLIC_EVENT_START_DATE, PUBLIC_EVENT_END_DATE } from "$env/static/public";
9+
import { Temporal } from "temporal-polyfill-lite";
10+
11+
const start = Temporal.PlainDate.from(PUBLIC_EVENT_START_DATE).day;
12+
const end = Temporal.PlainDate.from(PUBLIC_EVENT_END_DATE).toLocaleString('es', {
13+
year: 'numeric', month: 'long', day: 'numeric'
14+
});
915
</script>
1016

1117
El Consejo de Estudiantes de la Escuela Técnica Superior de Ingeniería Informática
1218
de la Universidad de Málaga se ha puesto en marcha para organizar la "[Hackers Week](/)".
1319

14-
El evento se celebrará del 9 al 13 de marzo de 2026.
20+
El evento se celebrará del <time datetime={PUBLIC_EVENT_START_DATE}>{start}</time>
21+
al <time datetime={PUBLIC_EVENT_END_DATE}>{end}</time>.
1522

1623
## Modalidades de Presentación
1724
Los autores pueden optar por diferentes modalidades de presentación:

0 commit comments

Comments
 (0)