lukasbesch/shortcode-year-or-years

WordPress Plugin that provides a shortcode to display the current year, optionally including a start year. Commonly used in copyright notices.

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:wordpress-plugin

pkg:composer/lukasbesch/shortcode-year-or-years

1.0.0 2020-04-01 14:48 UTC

This package is auto-updated.

Last update: 2025-10-20 01:37:25 UTC


README

Provides a WordPress shortcode to display the current year, and optionally a start year.

Commonly used for copyright notices.

Installation

composer require lukasbesch/shortcode-year-or-years

Alternatively download the latest release from GitHub and install it into the plugins directory.

Usage

Show current year

[year_or_years]
// 2025

Show current year and a start year

[year_or_years from="2019"]
// 2019–2025

The start year will only be displayed if it is lower than the current year:

[year_or_years from="2025"]
// 2025

Optionally specify a custom separator:

[year_or_years from="1984" separator=" until "]
// 1984 until 2025