rfc:intldatetimepatterngenerator

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:intldatetimepatterngenerator [2021/04/30 16:23] – Missing bracket deltragonrfc:intldatetimepatterngenerator [2021/04/30 16:46] – Add procedural style functions deltragon
Line 32: Line 32:
     public function getBestPattern(string $skeleton): string|false {}     public function getBestPattern(string $skeleton): string|false {}
 } }
 +
 +// Procedural style:
 +function datepatterngenerator_create(?string $locale = null): ?IntlDatePatternGenerator {}
 +
 +function datepatterngenerator_get_best_pattern(IntlDatePatternGenerator $patternGenerator, string $skeleton): string|false {}
 </code> </code>
  
Line 76: Line 81:
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
 8.1 8.1
- 
-===== Open Issues ===== 
- 
-==== Constructor ==== 
-Like ''IntlDateFormatter'', this provides both a ''<nowiki>__construct</nowiki>'' method and an equivalent static ''create'' method. 
-Other classes inside the intl extension (like ''IntlCalendar'') only provide a static ''create'' method, and leave the ''<nowiki>__</nowiki>construct'' method private. Is there a preferred way, or are both equivalent? 
  
 ===== Future Scope ===== ===== Future Scope =====
rfc/intldatetimepatterngenerator.txt · Last modified: 2021/06/10 11:48 by nikic