Title: Provide documentation/examples for relative_date() function
Last modified: April 9, 2017

---

# Provide documentation/examples for relative_date() function

 *  Resolved [ajkessel](https://wordpress.org/support/users/ajkessel/)
 * (@ajkessel)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/provide-documentationexamples-for-relative_date-function/)
 * 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)

 *  Plugin Author [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/provide-documentationexamples-for-relative_date-function/#post-9012527)
 * Hi [@ajkessel](https://wordpress.org/support/users/ajkessel/),
 * That’s a very good point. I’ll add it to the list of document improvements.
 *  Plugin Author [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/provide-documentationexamples-for-relative_date-function/#post-9015410)
 * That’s now done!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Provide documentation/examples for relative_date() function’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-relative-date_6d5b16.svg)
 * [Relative Date](https://wordpress.org/plugins/wp-relative-date/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-relative-date/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-relative-date/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-relative-date/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-relative-date/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-relative-date/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [David Artiss](https://wordpress.org/support/users/dartiss/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/provide-documentationexamples-for-relative_date-function/#post-9015410)
 * Status: resolved