Skip to content

Sniff to discourage use of number_format() and date() in output #739

Open
@jrfnl

Description

WP has the number_format_i18n() and the date_i18n() functions which allow for localization of numbers and dates.

While the "normal" number_format(), date_format(), date(), gmdate(), gmstrftime() and strftime() all have their place in code, I believe that when used in combination with an output generating function, the WP functions should be encouraged (and the PHP ones discouraged).

Opinions ?

On that note, there is also a PHP money_format() function. I'm not aware of a WP equivalent. Anyone know of one ?

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