Update docs

pull/2487/head
jmontoyaa 9 years ago
parent b9a0f956c4
commit 3f1fd97629
  1. 1
      main/inc/lib/display.lib.php
  2. 10
      main/inc/lib/internationalization.lib.php

@ -2486,6 +2486,7 @@ HTML;
}
/**
* Returns the string "1 day ago" with a link showing the exact date time.
* @param string $dateTime in UTC
*
* @return string

@ -660,14 +660,12 @@ function api_format_date($time, $format = null, $language = null)
}
/**
* Returns the difference between the current date (date(now)) with the parameter $date in a string format like "2 days, 1 hour"
* Example: $date = '2008-03-07 15:44:08';
* date_to_str($date) it will return 3 days, 20 hours
* The given date should be in the timezone chosen by the user or administrator. Use api_get_local_time() to get it...
* Returns the difference between the current date (date(now)) with the parameter
* $date in a string format like "2 days ago, 1 hour ago".
* You can use it like this:
* Display::tip(date_to_str_ago($dateInUtc), api_get_local_time($dateInUtc));
* Display::dateToStringAgoAndLongDate($dateInUtc);
*
* @param string $date The string has to be the result of a date function in this format -> date('Y-m-d H:i:s', time());
* @param string $date Result of a date function in this format -> date('Y-m-d H:i:s', time());
* @param string $timeZone
* @return string
*

Loading…
Cancel
Save