Skip to content
Brought to you by Allons-y Studio
dashly A standard library of filters, transforms, & shortcodes for Eleventy

year

In Shortcodes

Current-year shortcode for footer copyrights and similar.

import { currentYear } from '@allons-y/dashly/shortcodes/year';

currentYear()

Return the current four-digit year. Distinct from the year filter, which extracts the year from a passed-in date.

Returns

number

Examples

// <p>&copy; {% currentYear %} Acme Corp.</p>
// 2026
currentYear();

Allons-y Studio

Let's build something great together

A front-end & design systems studio helping teams ship consistent, accessible UI faster.