<small id='UFnOw'></small><noframes id='UFnOw'>

<tfoot id='UFnOw'></tfoot>
    1. <legend id='UFnOw'><style id='UFnOw'><dir id='UFnOw'><q id='UFnOw'></q></dir></style></legend>
      1. <i id='UFnOw'><tr id='UFnOw'><dt id='UFnOw'><q id='UFnOw'><span id='UFnOw'><b id='UFnOw'><form id='UFnOw'><ins id='UFnOw'></ins><ul id='UFnOw'></ul><sub id='UFnOw'></sub></form><legend id='UFnOw'></legend><bdo id='UFnOw'><pre id='UFnOw'><center id='UFnOw'></center></pre></bdo></b><th id='UFnOw'></th></span></q></dt></tr></i><div id='UFnOw'><tfoot id='UFnOw'></tfoot><dl id='UFnOw'><fieldset id='UFnOw'></fieldset></dl></div>

          <bdo id='UFnOw'></bdo><ul id='UFnOw'></ul>

        如何控制 DateFormat 返回的月份和日期名称的大小写?

        时间:2024-08-25
      2. <tfoot id='Gx1JR'></tfoot>

          <bdo id='Gx1JR'></bdo><ul id='Gx1JR'></ul>

          • <i id='Gx1JR'><tr id='Gx1JR'><dt id='Gx1JR'><q id='Gx1JR'><span id='Gx1JR'><b id='Gx1JR'><form id='Gx1JR'><ins id='Gx1JR'></ins><ul id='Gx1JR'></ul><sub id='Gx1JR'></sub></form><legend id='Gx1JR'></legend><bdo id='Gx1JR'><pre id='Gx1JR'><center id='Gx1JR'></center></pre></bdo></b><th id='Gx1JR'></th></span></q></dt></tr></i><div id='Gx1JR'><tfoot id='Gx1JR'></tfoot><dl id='Gx1JR'><fieldset id='Gx1JR'></fieldset></dl></div>

            <small id='Gx1JR'></small><noframes id='Gx1JR'>

                <tbody id='Gx1JR'></tbody>
              • <legend id='Gx1JR'><style id='Gx1JR'><dir id='Gx1JR'><q id='Gx1JR'></q></dir></style></legend>

                  本文介绍了如何控制 DateFormat 返回的月份和日期名称的大小写?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  这是一个快速测试程序:

                  Here is a quick test program:

                      public static void main( String[] args )
                  {
                      Date date = Calendar.getInstance().getTime();
                  
                      System.out.println("Months:");
                      printDate( "MMMM", "en", date );
                      printDate( "MMMM", "es", date );
                      printDate( "MMMM", "fr", date );
                      printDate( "MMMM", "de", date );
                  
                      System.out.println("Days:");
                      printDate( "EEEE", "en", date );
                      printDate( "EEEE", "es", date );
                      printDate( "EEEE", "fr", date );
                      printDate( "EEEE", "de", date );
                  
                  }
                  
                  public static void printDate( String format, String locale, Date date )
                  {
                      System.out.println( locale + ": " + (new SimpleDateFormat( format, new Locale( locale ) )).format( date ) );
                  }
                  

                  输出是:

                  <代码>月份:zh: 九月es: 九月法国:九月去:九月天:zh: 星期一es: 月牙fr: 隆迪de: 蒙塔格

                  如何控制名称的大小写.出于某种原因,西班牙语和法语似乎总是返回以小写字母开头的名称.

                  How can I control the capitalization of the names. For some reason the Spanish and French always seem to return names that start with a lowercase letter.

                  推荐答案

                  并非所有语言都共享英文大写规则.我猜您需要更改 API 使用的数据,但您的非英语客户可能不喜欢它...

                  Not all languages share english capitalization rules. I guess you'd need to alter the data used by the API, but your non-english clients might not appreciate it...

                  about.com 关于法语大写

                  这篇关于如何控制 DateFormat 返回的月份和日期名称的大小写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在属性文件中查找重复键和值的工具 下一篇:如何在java中找出依赖于语言环境的文本方向?

                  相关文章

                  <i id='a5eoI'><tr id='a5eoI'><dt id='a5eoI'><q id='a5eoI'><span id='a5eoI'><b id='a5eoI'><form id='a5eoI'><ins id='a5eoI'></ins><ul id='a5eoI'></ul><sub id='a5eoI'></sub></form><legend id='a5eoI'></legend><bdo id='a5eoI'><pre id='a5eoI'><center id='a5eoI'></center></pre></bdo></b><th id='a5eoI'></th></span></q></dt></tr></i><div id='a5eoI'><tfoot id='a5eoI'></tfoot><dl id='a5eoI'><fieldset id='a5eoI'></fieldset></dl></div>

                  1. <legend id='a5eoI'><style id='a5eoI'><dir id='a5eoI'><q id='a5eoI'></q></dir></style></legend>
                      <bdo id='a5eoI'></bdo><ul id='a5eoI'></ul>

                  2. <small id='a5eoI'></small><noframes id='a5eoI'>

                    <tfoot id='a5eoI'></tfoot>