Skip to content

Added docs for "date" and "number_format" Twig options #8116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 1, 2017

Conversation

javiereguiluz
Copy link
Member

@javiereguiluz javiereguiluz commented Jul 4, 2017

#This fixes #7530.

  • I don't know how to configure these options in XML format. I need help.
  • The PHP block looks changed entirely because there was an indentation issue and I removed a white space in every line.

@xabbuh
Copy link
Member

xabbuh commented Jul 9, 2017

In fact, using XML to configure the formats was not possible (see symfony/symfony#23459 for the fix).

The config will then look like this:

<?xml version="1.0" ?>
<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:twig="http://symfony.com/schema/dic/twig"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
        http://symfony.com/schema/dic/twig http://symfony.com/schema/dic/twig/twig-1.0.xsd">

    <twig:config>
        <twig:date format="d.m.Y, H:i:s" interval-format="%d days" timezone="Asia/Tokyo" />
        <twig:number-format decimals="2" decimal-point="," thousands-separator="." />
    </twig:config>
</container>

@HeahDude HeahDude added this to the 2.7 milestone Jul 29, 2017
@HeahDude HeahDude added the Twig label Jul 29, 2017
@xabbuh
Copy link
Member

xabbuh commented Aug 1, 2017

Thank you @javiereguiluz.

@xabbuh xabbuh merged commit cbbfe44 into symfony:2.7 Aug 1, 2017
xabbuh added a commit that referenced this pull request Aug 1, 2017
…aviereguiluz, HeahDude)

This PR was merged into the 2.7 branch.

Discussion
----------

Added docs for "date" and "number_format" Twig options

#This fixes #7530.

* I don't know how to configure these options in XML format. I need help.
* The PHP block looks changed entirely because there was an indentation issue and I removed a white space in every line.

Commits
-------

cbbfe44 Removed an extra line
543b482 Merge branch '2.7' into fix_7530
11e245b Updated xml config
0a25c17 Added docs for "date" and "number_format" Twig options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants