I want to use with JavaScript and Drupal.t()
the equivalent of format_interval()
.
With PHP I would use the following code.
print t("!date ago", array("!date" => format_interval(time() - $lastActivity, 1)));
What would the equivalent in JavaScript be?