Page MenuHomePhabricator

{{#time}} doesn't work with Russian input
Closed, InvalidPublic

Description

Russian months input doesnt work neither 'F' or 'xg' format:

  • {{#time:j xg Y|14 июня 2015}} give: error time
  • {{#time:j xg Y|14 июня 2015|ru}} give: error time
  • {{#time:j F Y|14 июнь 2015|ru}} give: error time

If input are English then work but output are Russian:

  • {{#time:j xg Y|14 june 2015|ru}} give: 14 июня 2015
  • {{#time:j F Y|14 june 2015|ru}} give: 14 июнь 2015

Event Timeline

Vladis13 raised the priority of this task from to Medium.
Vladis13 updated the task description. (Show Details)
Vladis13 added a project: ParserFunctions.
Vladis13 subscribed.
Nemo_bis renamed this task from {{#time}} doesnt works with Russian input to {{#time}} doesn't work with Russian input.Nov 14 2015, 11:47 AM
Nemo_bis set Security to None.

To examle: {{#time:Y-m-d|14 june 2015}} give: 2015-06-14
You want to say that reformatting of dates works only in English?

Nemo_bis claimed this task.

Yes: the documentation says "The date/time object can be in any format accepted by PHP's strtotime() function." http://www.php.net/manual/en/function.strtotime.php

So the function is working as expected. If you want to propose a different mode of operation than strtotime(), better make another report, ideally with a concrete proposal.