WordPress.org

Forums

[resolved] Custom date formatting (days old) (3 posts)

  1. kidsquiddles
    Member
    Posted 6 years ago #

    Hi all,

    Not sure if this is a plug-in or likely to be PHP code.
    I am looking to replace my post time stamps/date formatting with something like the below examples:

    This would be for a post that is 1 day old:

    Age: 1d

    This would be for a post that is 2 day, 1 month old:

    Age: 1m 2d

    This would be for a post that is 2 year 2 day, 1 month old:

    Age: 2y 1m 2d

    Hope all this makes sense, and I have explained it all clearly, but it would be great if someone could shed some light on this, and get me one step closer to getting my blog finished :)

    Thanks all

  2. MichaelH
    Member
    Posted 6 years ago #

  3. kidsquiddles
    Member
    Posted 6 years ago #

    Fantastic!

    Thanks Michael, got that working perfectly :)

Topic Closed

This topic has been closed to new replies.

About this Topic