Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 312 Bytes

Year.md

File metadata and controls

19 lines (15 loc) · 312 Bytes
tags template

Year

This space script will add a template function that returns the year of a given date.

silverbullet.registerFunction("year",(date) => {
  const plainDate = Temporal.PlainDate.from(date)
  return plainDate.year
})

Example

 {{year(today())}}