0

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?

0

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.

  • I was asking about how to translate the string that follows the time format, not how to convert dates. I apologize if my question was not clear enough for you. – Jed_BH Mar 24 '17 at 7:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.