I want to use in javascript function Drupal.twith JavaScript and Drupal.t()
the equivalent of format_interval functionformat_interval()
.
With php it's easy:
With PHP I would use the following code.
print t("!date ago", array("!date" => format_interval(time() - $lastActivity, 1)));
but I want to useWhat would the equivalent in Drupal.t which canJavaScript be used in javascript.?