core/src/PlufDate.php

Classes

Pluf_Date کلاسی کاربردی برای کار با تاریخ

Functions

Pluf_Date_Compare()

Pluf_Date_Compare(  $date1,   $date2 = null) : integer

مقایسه دو تاریخ با یکدیگر

Compare two date and returns the number of seconds between the first and the second. If only the date is given without time, the end of the day is used (23:59:59).

Parameters

$date1
$date2

Returns

integer —

Number of seconds between the two dates. Negative value if the second date is before the first.

Pluf_Date_Easy()

Pluf_Date_Easy(  $date,   $ref = null,   $blocks = 2,   $notime = 'now',   $show = true) : string

نمایش تاریخ به فرمت دلخواه

Display a date in the format: X days Y hours ago X hours Y minutes ago X hours Y minutes left

"resolution" is year, month, day, hour, minute.

If not time is given, only the day, the end of the day is used: 23:59:59.

Parameters

$date
$ref
$blocks
$notime
$show

Returns

string —

Formatted date