PHP » GoLang |
login |
register |
about
|
GoLang IntlCalendar::fieldDifference
request it (279)
GoLang replacement for PHP's IntlCalendar::fieldDifference
[edit | history]
PHP IntlCalendar::fieldDifferencePHP original manual for IntlCalendar::fieldDifference [ show | php.net ]IntlCalendar::fieldDifference(PHP 5 >= 5.5.0, PHP 7, PECL >= 3.0.0a1) IntlCalendar::fieldDifference — Calculate difference between given time and this objectʼs time DescriptionObject oriented style
public int IntlCalendar::fieldDifference
( float
$when
, int $field
)Procedural style
Return the difference between the given time and the time this object is
set to, with respect to the quantity specified the
This method is meant to be called successively, first with the most significant field of interest down to the least significant field. To this end, as a side effect, this calendarʼs value for the field specified is advanced by the amount returned. Parameters
Return Values
Returns a (signed) difference of time in the unit associated with the
specified field or Examples
Example #1 IntlCalendar::fieldDifference()
<?php The above example will output: Time before: 29 févr. 2012 09:00:11 The difference in time is 1 year(s), 0 month(s), 1 day(s), 0 hour(s) and 19 minute(s) Time after: 1 mars 2013 09:19:11 |
more
Recently updated
more
Most requested
more
Last requests
|