Re: [PHP-DEV] [RFC] IntlRelativeDateTimeFormatter

"Weilin Du" <[email protected]>
Newsgroups gmane.comp.php.devel
Message-ID <[email protected]>
Hi David,


I tried this as an experimental feature. The implementation is way more smoother than I
expected. As the numberFormatter class in PHP side is somehow very suitable for this.
&nbsp;
The proposed constructor is now:


&nbsp; public function __construct(
&nbsp; &nbsp; &nbsp; ?string $locale = null,
&nbsp; &nbsp; &nbsp; int $style = self::STYLE_LONG,
&nbsp; &nbsp; &nbsp; int $capitalizationContext = self::CAPITALIZATION_NONE,
&nbsp; &nbsp; &nbsp; ?NumberFormatter $numberFormatter = null,
&nbsp; ) {}


Also, considering enums and namespaces. Tim raised this suggestion to me before. So I'd
like to put this in the future scope of this RFC. A broader ext/intl modernization RFC could
revisit namespaces and PHP enums consistently across intl classes. This is not we are
supposed to do in this specific RFC imho. However, the idea is reasonable.&nbsp;


Thanks for the feedback!


Cheers,
Weilin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.