mirror of
https://github.com/friendica/friendica
synced 2025-04-23 21:50:10 +00:00
Replace remaining functions in include/datetime by Temporal methods
- Fix uses statements
This commit is contained in:
parent
d0c9e7939c
commit
cea80c78e4
20 changed files with 60 additions and 48 deletions
|
@ -15,9 +15,10 @@ use Friendica\Database\DBM;
|
|||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Object\Post;
|
||||
use Friendica\Util\XML;
|
||||
use Friendica\Object\Thread;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Temporal;
|
||||
use Friendica\Util\XML;
|
||||
|
||||
require_once "include/bbcode.php";
|
||||
require_once "include/acl_selectors.php";
|
||||
|
@ -791,7 +792,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
|
|||
'folders' => $folders,
|
||||
'text' => strip_tags($body_e),
|
||||
'localtime' => DateTimeFormat::local($item['created'], 'r'),
|
||||
'ago' => (($item['app']) ? L10n::t('%s from %s', relative_date($item['created']),$item['app']) : relative_date($item['created'])),
|
||||
'ago' => (($item['app']) ? L10n::t('%s from %s', Temporal::getRelativeDate($item['created']),$item['app']) : Temporal::getRelativeDate($item['created'])),
|
||||
'location' => $location_e,
|
||||
'indent' => '',
|
||||
'owner_name' => $owner_name_e,
|
||||
|
@ -1166,7 +1167,7 @@ function builtin_activity_puller($item, &$conv_responses) {
|
|||
* @param array $arr = array of pre-linked names of likers/dislikers
|
||||
* @param string $type = one of 'like, 'dislike', 'attendyes', 'attendno', 'attendmaybe'
|
||||
* @param int $id = item id
|
||||
* @return formatted text
|
||||
* @return string formatted text
|
||||
*/
|
||||
function format_like($cnt, array $arr, $type, $id) {
|
||||
$o = '';
|
||||
|
|
|
@ -17,6 +17,7 @@ use Friendica\Protocol\OStatus;
|
|||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\ParseUrl;
|
||||
use Friendica\Util\Temporal;
|
||||
|
||||
require_once 'include/bbcode.php';
|
||||
require_once 'include/tags.php';
|
||||
|
@ -428,7 +429,7 @@ function list_post_dates($uid, $wall) {
|
|||
while (substr($dnow, 0, 7) >= substr($dthen, 0, 7)) {
|
||||
$dyear = intval(substr($dnow, 0, 4));
|
||||
$dstart = substr($dnow, 0, 8) . '01';
|
||||
$dend = substr($dnow, 0, 8) . get_dim(intval($dnow), intval(substr($dnow, 5)));
|
||||
$dend = substr($dnow, 0, 8) . Temporal::getDaysInMonth(intval($dnow), intval(substr($dnow, 5)));
|
||||
$start_month = DateTimeFormat::utc($dstart, 'Y-m-d');
|
||||
$end_month = DateTimeFormat::utc($dend, 'Y-m-d');
|
||||
$str = day_translate(DateTimeFormat::utc($dnow, 'F'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue