Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

IntlDateFormatter manual doesn't include enough parameter explanation #1484

Closed

Description

@BSarmady

From manual page: https://php.net/class.intldateformatter


There are not enough explanations of constructor parameters.

  1. What are valid values for $locale? I happen to know that locale is not just en-US or fa-IR and it is like fa_IR@calendar=persian

  2. What are valid values for $pattern? I can see y, m and d in combinations, but how do I specify time pattern in input? for example when on GMT it is still 9PM, it is already next day on GMT+8

  3. And finally which TRADITIONAL calendars are supported?
    For example, in Saudi Arabia, Iran and a few other countries, TRADITIONAL calendar returns official calendar, but In USA, TRADITIONAL is the same as GREGORIAN. This means passing date through format, will change it to official calendar of country for first case but will not touch it for second case, which is desired effect in my case

    However for a Chinese speaking person in Malaysia TRADITIONAL Calendar is not official calendar which means in a global website simply passing every date through format will not return official date.
    To address this, I need to know which Traditional Calendars are supported and in my code change them accordingly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions