Googling the only thing I've managed to find is: https://www.drupal.org/node/2800563
What can I do to translate 'ago' or omit it from printing?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityGoogling the only thing I've managed to find is: https://www.drupal.org/node/2800563
What can I do to translate 'ago' or omit it from printing?
can't we do like this?
//Get today's date.
$today = getdate();
//Calculate the date "1 week ago".
$start_time = mktime(0, 0, 0,$today['mon'],($today['mday'] - 7), $today['year']);
Also, you can change those zeroes to make 'n' hours/ minutes/ seconds ago.