• Resolved ajkessel

    (@ajkessel)


    It took me a while to figure out how to make the relative date be something other than post-date to current-date. It is not unusual that people want the relative date to be relative to a certain fixed historical point–for example, the age of a child or the length of a trip. I think people would appreciate some examples in the documentation of what this should look like. For example, the following would give the age of a child born on 1/1/2010:
    get_relative_date( strtotime("1/1/2010") , get_the_time( 'U' ) , ", ", "2" )
    Of course, integrating it into a theme will be different for each theme, but some guidance could be provided for that as well.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Provide documentation/examples for relative_date() function’ is closed to new replies.