久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<legend id='gBaQo'><style id='gBaQo'><dir id='gBaQo'><q id='gBaQo'></q></dir></style></legend>
  • <i id='gBaQo'><tr id='gBaQo'><dt id='gBaQo'><q id='gBaQo'><span id='gBaQo'><b id='gBaQo'><form id='gBaQo'><ins id='gBaQo'></ins><ul id='gBaQo'></ul><sub id='gBaQo'></sub></form><legend id='gBaQo'></legend><bdo id='gBaQo'><pre id='gBaQo'><center id='gBaQo'></center></pre></bdo></b><th id='gBaQo'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='gBaQo'><tfoot id='gBaQo'></tfoot><dl id='gBaQo'><fieldset id='gBaQo'></fieldset></dl></div>

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

      1. <tfoot id='gBaQo'></tfoot>
          <bdo id='gBaQo'></bdo><ul id='gBaQo'></ul>
      2. 為什么我的本地機器可能會錯誤地格式化國際日

        Why might my local machine be incorrectly formatting international dates?(為什么我的本地機器可能會錯誤地格式化國際日期?)
          <bdo id='AaG3S'></bdo><ul id='AaG3S'></ul>
                <tbody id='AaG3S'></tbody>
              <legend id='AaG3S'><style id='AaG3S'><dir id='AaG3S'><q id='AaG3S'></q></dir></style></legend>

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

                1. <tfoot id='AaG3S'></tfoot>

                2. <i id='AaG3S'><tr id='AaG3S'><dt id='AaG3S'><q id='AaG3S'><span id='AaG3S'><b id='AaG3S'><form id='AaG3S'><ins id='AaG3S'></ins><ul id='AaG3S'></ul><sub id='AaG3S'></sub></form><legend id='AaG3S'></legend><bdo id='AaG3S'><pre id='AaG3S'><center id='AaG3S'></center></pre></bdo></b><th id='AaG3S'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='AaG3S'><tfoot id='AaG3S'></tfoot><dl id='AaG3S'><fieldset id='AaG3S'></fieldset></dl></div>
                  本文介紹了為什么我的本地機器可能會錯誤地格式化國際日期?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  這是一個奇怪的...

                  我剛剛看到一個(之前通過的)測試失敗,因為日期的字符串表示中有多余的空格.有問題的測試以前在 CI 和我的本地機器上通過,但現在(在我的本地機器上)失敗了,因為日期段之間有多余的空格.

                  以下 MCVE 表現出相同的行為:

                  使用系統;使用 System.Globalization;公開課程序{公共靜態無效 Main(){var date = new DateTime(2018, 01, 31);var format = "d/M/yyyy";var skSK = new CultureInfo("sk-SK");Console.WriteLine(date.ToString(format, skSK));}}

                  在大多數地方(包括 .NET Fiddle)這會正確返回:

                  31.1.2018

                  但在我的機器上,我現在得到:

                  <代碼>31.1. 2018

                  注意多余的空格!

                  我確信這在本周早些時候在我的本地 PC 上按預期工作,因為我使用帶有此測試的項目作為對覆蓋工具進行一些實驗的起點.當我今天下午恢復該實驗時,由于新失敗的測試,不再生成覆蓋率文件.

                  我的 PC 上發生了什么變化會導致這種損壞的行為?

                  解決方案

                  在 Windows(和許多其他系統一樣)中,Locale 日期/時間格式的來源是 Unicode Common Locale Data Repository (CLDR),為軟件開發人員和語言學家提供國際化和本地化支持.

                  有意義的用戶的簡短列表:

                  <塊引用>
                  • 微軟(Windows、Office、Visual Studio 等)
                  • Apple(macOS、iOS、watchOS、tvOS、Apple 移動設備支持和適用于 Windows 的 iTunes;
                  • Google(網頁搜索、Chrome、Android、Adwords、Google+、Google 地圖、Blogger、Google Analytics)
                  • IBM(DB2、Lotus、Websphere、Tivoli、Rational、AIX、i/OS、z/OS)
                  • 亞馬遜

                  查看本地化的在線數據瀏覽器:Locale Explorer.

                  短日期格式,本地化為 sk-SK 文化為 d.M. yyyy,是這個檔案中列出的那個.所有操作系統(Windows 7 到 Window 10)都一樣.

                  與 MS Developer 相關的博客:Locale Builder 和芬蘭語或其他語言環境.

                  Fiddler 或其他在線代碼運行服務不是這件事的比較來源.
                  區域設置因系統而異.此外,這些國際格式會隨著時間而變化,并取決于系統接收到的更新(如果它完全接收到這些更新).

                  在 Windows 7 和 Windows 10 中,sk-SK 文化的默認短日期格式為 d.M.yyyy.
                  但如果進一步解析格式列表,則 DateTime 模式不匹配.

                  字符串格式 = CultureInfo.CreateSpecificCulture("sk-SK").DateTimeFormat.GetAllDateTimePatterns()[1];

                  在 Windows 7 中,DateTimePatterns 列表中的第二個元素是 d.M.yyyy
                  在 Windows 10 中,同一索引處的元素是:dddd d.MMMM yyyy

                  Windows 更新可能會更改任何區域設置的默認模式(無需明確通知).
                  可以理解,應用程序必須為特殊情況提供解析手段.或者在格式化時參考用戶的區域設置,而不是試圖強制一個特定的模式供內部使用.
                  日期/時間格式應僅用于演示.區域設置和用戶設置決定了該格式.系統的用戶可能會決定使用與默認區域設置不同的格式.

                  此 GitHub 存儲庫包含 CLDR 數據庫的更新 JSON:
                  CLDR 日期現代

                  API 國際化的 ECMAScript 參考也很有趣:
                  ECMAScript? 2017 國際化 API 規范

                  MSDN 最新的全球化和本地化指南(UWP 相關):
                  全球化和本地化
                  全球化您的日期/時間/數字格式
                  使用多語言應用工具包 4.0p>

                  Here's a weird one...

                  I've just seen a (previously passing) test fail because of extra spaces in a string representation of a date. The test in question has previously passed in CI and on my local machine, but is now failing (on my local machine) because of extra spaces between segments of the date.

                  The same behaviour is exhibited by the following MCVE:

                  using System;
                  using System.Globalization;
                  
                  public class Program
                  {
                      public static void Main()
                      {
                          var date = new DateTime(2018, 01, 31);
                          var format = "d/M/yyyy";
                          var skSK = new CultureInfo("sk-SK");
                          Console.WriteLine(date.ToString(format, skSK));
                      }
                  }
                  

                  In most places (including .NET Fiddle) this correctly returns:

                  31.1.2018
                  

                  But on my machine, I now get:

                  31. 1. 2018
                  

                  Note the extra spaces!

                  I'm confident that this was working as expected on my local PC just earlier this week, as I was using the project with this test in as a starting point for some experimentation with coverage tools. When I've resumed that experimentation this afternoon, the coverage file is no longer being produced due to the newly failing test.

                  What could have changed on my PC to cause this broken behaviour?

                  解決方案

                  In Windows (like many others System), the source for the Locale date/time formats is the Unicode Common Locale Data Repository (CLDR), which provides internationalization and localization support specific for software developers and linguists.

                  A Short list of meaningful users:

                  • Microsoft (Windows, Office, Visual Studio etc.)
                  • Apple (macOS, iOS, watchOS, tvOS, Apple Mobile Device Support and iTunes for Windows;
                  • Google (Web Search, Chrome, Android, Adwords, Google+, Google Maps, Blogger, Google Analytics)
                  • IBM (DB2, Lotus, Websphere, Tivoli, Rational, AIX, i/OS, z/OS)
                  • Amazon

                  See the Online data explorer of the Localizations: Locale Explorer.

                  The Short Date format, localized to the sk-SK culture as d. M. yyyy, is the one listed in this archive. It's the same for all OS (Windows 7 to Window 10).

                  A MS Developer related blog: Locale Builder and Finnish or other locales.

                  Fiddler or other Online code-runners services are not a source of comparison on this matter.
                  Locales are different from system to system. Also, these international formats change over time and depend on the updates that a system receives (if it receives these updates at all).

                  In Windows 7 and Windows 10, the default Short Date format for the sk-SK Culture is d. M. yyyy.
                  But the DateTime patterns do not match, if the formats list is parsed further.

                  string format = CultureInfo.CreateSpecificCulture("sk-SK")
                                             .DateTimeFormat.GetAllDateTimePatterns()[1]; 
                  

                  In Windows 7, the second element in the DateTimePatterns list is d.M.yyyy
                  In Windows 10, the element at the same index is: dddd d. MMMM yyyy

                  A Windows update may change the default pattern for any of the Locales (without explicit notification).
                  It's understood that applications must provide parsing means for special cases. Or refer to the user Locale settings when formatting, without trying to force a specific pattern for internal uses.
                  Date/Time formats should be used for presentation only. The Locale and the user settings determine that format. An user of a System may decide to use a different format than the default Locale.

                  This GitHub repository holds an updated JSON of the CLDR database:
                  CLDR Date Modern

                  Also interesting, the ECMAScript reference for API internationalization:
                  ECMAScript? 2017 Internationalization API Specification

                  MSDN latest guidelines for Globalization and localization (UWP related):
                  Globalization and localization
                  Globalize your date/time/number formats
                  Use the Multilingual App Toolkit 4.0

                  這篇關于為什么我的本地機器可能會錯誤地格式化國際日期?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Ignore whitespace while reading XML(讀取 XML 時忽略空格)
                  XML to LINQ with Checking Null Elements(帶有檢查空元素的 XML 到 LINQ)
                  Reading XML with unclosed tags in C#(在 C# 中讀取帶有未閉合標簽的 XML)
                  Parsing tables, cells with Html agility in C#(在 C# 中使用 Html 敏捷性解析表格、單元格)
                  delete element from xml using LINQ(使用 LINQ 從 xml 中刪除元素)
                  Parse malformed XML(解析格式錯誤的 XML)

                      1. <tfoot id='8QuHx'></tfoot>

                        <legend id='8QuHx'><style id='8QuHx'><dir id='8QuHx'><q id='8QuHx'></q></dir></style></legend>
                          <bdo id='8QuHx'></bdo><ul id='8QuHx'></ul>

                          <small id='8QuHx'></small><noframes id='8QuHx'>

                            <tbody id='8QuHx'></tbody>
                          • <i id='8QuHx'><tr id='8QuHx'><dt id='8QuHx'><q id='8QuHx'><span id='8QuHx'><b id='8QuHx'><form id='8QuHx'><ins id='8QuHx'></ins><ul id='8QuHx'></ul><sub id='8QuHx'></sub></form><legend id='8QuHx'></legend><bdo id='8QuHx'><pre id='8QuHx'><center id='8QuHx'></center></pre></bdo></b><th id='8QuHx'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='8QuHx'><tfoot id='8QuHx'></tfoot><dl id='8QuHx'><fieldset id='8QuHx'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 国产视频导航 | 91在线网 | 婷婷综合激情 | 国产精品毛片一区二区三区 | 国产真实精品久久二三区 | 精品99爱视频在线观看 | 国产精品精品视频一区二区三区 | 不卡的av在线| 91美女视频| 欧美在线a| 久草视| 国产精品视频网 | 成人国产精品久久久 | 欧美天堂在线 | 国产精品性做久久久久久 | 中文字幕一区二区三区四区五区 | 自拍偷拍中文字幕 | 国产偷久久一级精品60部 | 国产精品一区二区三区久久 | 精品国产91| 精品国产乱码久久久久久闺蜜 | 91在线视频在线观看 | 日韩久久久久久久久久久 | 中文字幕成人 | 中文字幕精品一区二区三区精品 | 欧美一级视频免费看 | 美女天天操 | 中文字幕 国产 | 亚洲a视频 | 免费在线黄色av | 亚洲香蕉在线视频 | 欧美一级在线观看 | 亚洲综合大片69999 | 久久国产成人午夜av影院武则天 | 久久成人18免费网站 | 久久草视频 | 欧美一区二区三区一在线观看 | 九九综合 | 国产精品视频中文字幕 | 久久福利电影 | 在线三级网址 |