-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
How do I go about adding padding to months, days, and hours? I figure it is on view.oak, in here:
fn date(t) {
d := datetime.describe(t)
'<a class="datestamp" href="/on/{{0}}/{{1}}/{{2}}" title="Updates on this date">{{0}}/{{1}}/{{2}}</a>
<a class="clockstamp" href="/updates/{{5}}" title="Permalink to this update">{{3}}:{{4}}</a>' |> format(
d.year
d.month
d.day
d.hour
d.minute |> string() |> padStart(2, '0')
t
)
}
I tried adding |> string() |> padStart(2, '0’) after d.month, d.day, and so on, just like d.minute has, but that didn’t work.
Metadata
Metadata
Assignees
Labels
No labels