<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 返回的月份和日期名称的大小写?

        How to control the capitalization of month and day names returned by DateFormat?(如何控制 DateFormat 返回的月份和日期名称的大小写?)
      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 返回的月份和日期名称的大小写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

                      <tbody id='a5eoI'></tbody>
                    <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>

                      • <small id='a5eoI'></small><noframes id='a5eoI'>

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