Skip to content

Texts such as "I have worked for n years in web dev" or "We have n years of combined experience" are outdated within a year. This plugin keeps those numbers automatically updated.

Notifications You must be signed in to change notification settings

xxsimoxx/codepotent-timeless-text

Repository files navigation

You've probably seen the phrases. These are common phrases you can find on a great number of websites, often on an "About Us" or bio page. How many of those sites will remember to update those numbers each year? With the Timeless Text plugin, those phrases will be automatically updated to ensure they never fall out of sync.

I have 20 years of PHP development experience.

We have 35 years of combined experience!

It all began 2 years ago when...


To Calculate Elapsed Years

To process a single date into the number of elapsed years, use the following format.

Usage [timeless-text y=2000 m=3 d=15 text=false]

Arguments

  • y Required The year value of the date to calculate.
  • m Optional The month value of the date to calculate. Defaults to 1.
  • d Optional The day value of the date to calculate. Defaults to 1.
  • text Optional Set to false to suppress the text portion and only return the integer value. Defaults to true.

Examples

I have [timeless-text y=2000 m=1 d=1] of experience with web development.

It all began just [timeless-text y=2000] ago.

So, there we were...that was [timeless-text y=2000 m=11 text=false] long years ago.


To Calculate Combined Years

To process a series of dates into a cumulative number of elapsed years, use the following format.

Usage [timeless-text combined="2000-03-14, 2010-03-14, 2000-03-14, 2010-03-16" text=false]

Arguments

  • combined Required The date values to calculate for cumulative years, comma-separated.
  • text Optional Set to false to suppress the text portion and only return the integer value. Defaults to true.

Examples

Together, we bring [timeless-text combined="2012-03-14, 2010-01-18"] of combined experience to your team.

Note: You must provide 2 or more dates. separated by commas. Each date must include the year, month, and day. You can use hyphens or forward-slashes between those numbers.

About

Texts such as "I have worked for n years in web dev" or "We have n years of combined experience" are outdated within a year. This plugin keeps those numbers automatically updated.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages