Use Timeago date format for less than 24h ago only
Do users really sit on a page for a long enough time, that these dates need to be updated via javascript? Most of them will click on something and end up reloading the whole page at some point. So perhaps, a php solution is an option too?  

You could achieve the php solution by using the Custom Formatters module.

If you create a new php type custom formatter, with the following code (make sure it's a datestamp type):

$element = array();
foreach ($variables['#items'] as $delta =&gt; $item) {
  $unixstamp = $item['value'];
  $time_since = mktime() - $unixstamp;
  if ($time_since &lt; 86400) {
    $date_str = format_interval($time_since);
  }
  else {
    $date_str = format_date($unixstamp, 'custom', 'jS F Y');
  }

  $element[$delta] = array(
    '#type' =&gt; 'markup',
    '#markup' =&gt; $date_str,
  );
}
return $element;


When creating the formatter, make sure you select field type 'datestamp'. Once the formatter is created, then in the manage display tab of your content type, set the field to use this formatter.

If you don't have your date stored as a separate field, you might be able to apply the custom formatter to the node modified time, by installing the Display Suite module.

If you don't want to use any of these modules but want to hack some php into your theme or something, you can still use the same logic above with format_interval and format_date functions.

Hope that can help.