public static function preciseDifference(\DateTime $fromDate, \DateTime $toDate, $locale = 'en') { $formatter = new PreciseFormatter(Builder::build($locale)); return $formatter->formatDifference(new PreciseDifference($fromDate, $toDate), $locale); }
/** * @param $collection * @param null $limit * @param string $locale * @return string */ public static function oxford($collection, $limit = null, $locale = 'en') { $oxford = new Oxford(new Formatter(Builder::build($locale))); return $oxford->format($collection, $limit); }