<h1>
    Formatting Dates and Numbers
</h1>
<p>
    To globalize your application, register the appropriate culture
    while registering the C1 MVC scripts.
    <a href="http://wijmo.com/5/docs/static/globalization.html" target="_blank">
        MVC includes over 40 culture files you can choose from.
    </a>
</p>

<label>
    Please select a culture
    @Html.Partial("_CultureSelector")
</label>

<h2>
    Dates
</h2>
<p>
    Dates are formatted using the
    <b>Globalize.formatDate</b> function.
    For details regarding format strings, please refer the
    <a href="http://helpcentral.componentone.com/nethelp/c1mvchelpers/wijmo.Globalize.Class.html#formatDate" target="_blank">
        online documentation</a>.
</p>
<table id="tblDates" class="table table-condensed">
    <thead>
    <th>Format</th>
    <th>Description</th>
    <th>Result</th>
    </thead>
    <tbody>
        <tr>
            <td><b>d</b></td>
            <td>Short Date Pattern</td>
            <td>xx</td>
        </tr>
        <tr>
            <td><b>D</b></td>
            <td>Long Date Pattern</td>
            <td>xx</td>
        </tr>
        <tr>
            <td><b>f</b></td>
            <td>Full Date/Time Pattern (short time)</td>
            <td>xx</td>
        </tr>
        <tr>
            <td><b>F</b></td>
            <td>Full Date/Time Pattern (long time)</td>
            <td>xx</td>
        </tr>
        <tr>
            <td><b>t</b></td>
            <td>Short Time Pattern</td>
            <td>xx</td>
        </tr>
        <tr>
            <td><b>T</b></td>
            <td>Long Time Pattern</td>
            <td>xx</td>
        </tr>
        <tr>
            <td><b>'Q'Q yyyy</b></td>
            <td>Quarter/Year</td>
            <td>xx</td>
        </tr>
        <tr>
            <td><b>MMMM dd, yyyy</b></td>
            <td>Custom format</td>
            <td>xx</td>
        </tr>
    </tbody>
</table>

<div class="panel panel-warning">
    <div class="panel-heading">
        In addition to the standard .NET format specifiers, our MVC controls support
        a few additional specifiers including 'Q/q' for quarter, 'U/u' for
        fiscal quarter, and 'EEEE/eeee' for fiscal year.
    </div>
</div>

<h2>
    Numbers
</h2>
<p>
    Numbers are formatted using the <b>Globalize.formatNumber</b>
    function.
    For details regarding format strings, please refer the
    <a href="http://helpcentral.componentone.com/nethelp/c1mvchelpers/wijmo.Globalize.Class.html#formatNumber" target="_blank">
        online documentation</a>.
</p>
<label>
    Value
    @Html.C1().InputNumber().Id("theValue").Value(1234.5678).Step(1)
</label>
<label>
    Precision
    @Html.C1().InputNumber().Id("thePrecision").Value(2).Step(1).Min(0).Max(10)
</label>

<table id="tblNumbers" class="table table-condensed">
    <thead>
    <th>Specifier</th>
    <th>Description</th>
    <th class="text-right">Result</th>
    </thead>
    <tbody>
        <tr>
            <td><b>n*</b></td>
            <td>Number</td>
            <td class="text-right">xx</td>
        </tr>
        <tr>
            <td><b>n*,</b></td>
            <td>Number (thousands)</td>
            <td class="text-right">xx</td>
        </tr>
        <tr>
            <td><b>n*,,</b></td>
            <td>Number (millions)</td>
            <td class="text-right">xx</td>
        </tr>
        <tr>
            <td><b>f*</b></td>
            <td>Fixed-point</td>
            <td class="text-right">xx</td>
        </tr>
        <tr>
            <td><b>g*</b></td>
            <td>General (no trailing zeros)</td>
            <td class="text-right">xx</td>
        </tr>
        <tr>
            <td><b>d*</b></td>
            <td>Decimal (integers)</td>
            <td class="text-right">xx</td>
        </tr>
        <tr>
            <td><b>x*</b></td>
            <td>Hexadecimal (integers)</td>
            <td class="text-right">xx</td>
        </tr>
        <tr>
            <td><b>c*</b></td>
            <td>Currency</td>
            <td class="text-right">xx</td>
        </tr>
        <tr>
            <td><b>c*€</b></td>
            <td>Currency (explicit currency symbol)</td>
            <td class="text-right">xx</td>
        </tr>
        <tr>
            <td><b>c*&#x200b;</b></td> <!-- &#x200b; is a zero-width space -->
            <td>Currency (no currency symbol)</td>
            <td class="text-right">xx</td>
        </tr>
        <tr>
            <td><b>p*</b></td>
            <td>Percent</td>
            <td class="text-right">xx</td>
        </tr>
    </tbody>
</table>

<div class="panel panel-warning">
    <div class="panel-heading">
        Our numeric formats allow you to include an explicit currency symbol
        instead of the symbol of current culture.
        For example, an English application may need to generate lists with
        amounts in Dollars, Euros, and Yens.
    </div>
</div>