Support » Plugin: Years Since » Offset years

  • Resolved nathanwright

    (@nathanwright)


    Hi, nice plugin. It would be really great if you could add an “offset” parameter which allows a positive or negative value so that the year returned was offset by the offset value. For example let say you used the shortcode without the offset and it returned 10 then you use the same shortcode with an offset of -1 then it would return 9.

    Nathan

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author johnalarcon

    (@johnalarcon)

    Hi Nathan,

    Wow, I only just uploaded the plugin hours ago – figured it would be a time before anyone even found it. Thanks for giving it a spin.

    Your request is interesting. To ensure I’m understanding what you’re asking, can you give me a use-case such as how it might appear in the context of a sentence…or how you would want to use it on a site?

    Cheers!

    John

    Hi John

    Ok here is an example:

    “Fred has been in the IT industry for [years-since y=2001 offset=1]+ years.”

    Actually as I typed it the simple answer is just to change the y value to 2002 rather than 2001 and the result would be the same so there is probably no reason to add an offset.

    Sorry for the waste of time!

    Nathan

    Plugin Author johnalarcon

    (@johnalarcon)

    Ah, ok…I see what you’re after. Yes, just adding +1 to the year will achieve just what you’re looking for.

    …and wasn’t a waste of time; I greatly appreciate your inquiry and you never know who else might have this same question.

    Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Offset years’ is closed to new replies.