Custom date/time format string for i18n? #1802

Open
chtaube opened this Issue Nov 1, 2014 · 2 comments

Comments

Projects
None yet
3 participants
@chtaube

chtaube commented Nov 1, 2014

Without hacking core, there seem to be no proper way to change the output of date/time string when using localization.

Example: yourls_date_i18n( "F j, Y @ g:i a", … (source) returns Oktober 31, 2014 @ 1:37 pm while in Germany we would write this as 31. Oktober 2014, 13:37 Uhr.

@LeoColomb

This comment has been minimized.

Show comment
Hide comment
@LeoColomb

LeoColomb Nov 1, 2014

Member

In v2.0: with Carbon (#1583)

Member

LeoColomb commented Nov 1, 2014

In v2.0: with Carbon (#1583)

@ozh

This comment has been minimized.

Show comment
Hide comment
@ozh

ozh Nov 1, 2014

Member

Indeed.

Instead of:
yourls_date_i18n( "F j, Y @ g:i a", $timestamp )
we should have something like
yourls_date_i18n( yourls__( "F j, Y @ g:i a"), $timestamp )
and allow each locale to have its own date format

Postponed to 1.8 because of new translatable strings.

Member

ozh commented Nov 1, 2014

Indeed.

Instead of:
yourls_date_i18n( "F j, Y @ g:i a", $timestamp )
we should have something like
yourls_date_i18n( yourls__( "F j, Y @ g:i a"), $timestamp )
and allow each locale to have its own date format

Postponed to 1.8 because of new translatable strings.

@ozh ozh added this to the 1.8 milestone Nov 1, 2014

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