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

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

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

        這些日期是什么類(lèi)型的?

        What types of dates are these?(這些日期是什么類(lèi)型的?)
        <legend id='vToMa'><style id='vToMa'><dir id='vToMa'><q id='vToMa'></q></dir></style></legend>

        1. <i id='vToMa'><tr id='vToMa'><dt id='vToMa'><q id='vToMa'><span id='vToMa'><b id='vToMa'><form id='vToMa'><ins id='vToMa'></ins><ul id='vToMa'></ul><sub id='vToMa'></sub></form><legend id='vToMa'></legend><bdo id='vToMa'><pre id='vToMa'><center id='vToMa'></center></pre></bdo></b><th id='vToMa'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='vToMa'><tfoot id='vToMa'></tfoot><dl id='vToMa'><fieldset id='vToMa'></fieldset></dl></div>
            1. <small id='vToMa'></small><noframes id='vToMa'>

              <tfoot id='vToMa'></tfoot>
              • <bdo id='vToMa'></bdo><ul id='vToMa'></ul>

                    <tbody id='vToMa'></tbody>

                  本文介紹了這些日期是什么類(lèi)型的?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我有一個(gè)具有這種格式日期的 plist:

                  I have a plist with this format date:

                  Mar 11, 2013 10:16:31 AM
                  

                  在我的控制臺(tái)中顯示為

                  2013-03-11 16:16:31 +0000
                  

                  而 Web 服務(wù)正在返回控制臺(tái)中的內(nèi)容,如下所示:

                  whereas a webservice is returning something that in the console looks like this:

                  2013-03-01T18:21:45.231Z
                  

                  如何將我的 plist 日期修復(fù)為與 Web 服務(wù)相同的格式?

                  How do I fix my plist date to the same format as the web service?

                  推薦答案

                  關(guān)于你的三種日期格式:

                  Regarding your three date formats:

                  1. 當(dāng)您在 Xcode 的 plist 中查看 NSDate 時(shí),第一個(gè)只是日期格式,這是當(dāng)前語(yǔ)言環(huán)境中人類(lèi)可讀的日期(但如果您在文本編輯器,你會(huì)看到它實(shí)際上是用 @"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'" 格式編寫(xiě)的).

                  1. The first is just the date format when you look at a NSDate in a plist in Xcode, a human readable date in the current locale (but if you look at the plist in a text editor, you'll see it's actually written in @"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'" format).

                  第二個(gè)是來(lái)自 description 方法的默認(rèn)格式一個(gè) NSDate (例如你的 NSLog 一個(gè) NSDate).

                  The second is the default formatting from the description method a NSDate (e.g. you NSLog a NSDate).

                  第三個(gè)是RFC 3339/ISO 8601 格式(只有幾分之一秒),通常用于 Web 服務(wù).

                  The third is RFC 3339/ISO 8601 format (with fractions of a second), often used in web services.

                  請(qǐng)參閱 Apple 的 技術(shù)問(wèn)答 QA1480.

                  See Apple's Technical Q&A QA1480.

                  順便說(shuō)一句,該技術(shù)說(shuō)明不包括毫秒,因此您可能希望使用類(lèi)似 @"yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'SSS'Z'",例如:

                  As an aside, that Technical Note doesn't include the milliseconds, so you might want to use something like @"yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'SSS'Z'", for example:

                  NSDate *date = [NSDate date];
                  NSLocale *enUSPOSIXLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];
                  NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
                  formatter.locale = enUSPOSIXLocale;
                  formatter.dateFormat = @"yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'SSS'Z'";
                  formatter.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
                  NSString *dateString = [formatter stringFromDate:date];
                  NSLog(@"%@", dateString);
                  

                  如果您想將日期作為 RFC 3339/ISO 8601 格式的字符串存儲(chǔ)在 plist 中(或者,如果您需要將 NSDate 轉(zhuǎn)換為字符串以進(jìn)行傳輸,則可以使用它到您的網(wǎng)絡(luò)服務(wù)).如上所述,默認(rèn)的 plist 格式不會(huì)為 NSDate 對(duì)象保留幾分之一秒,因此如果這很關(guān)鍵,將日期存儲(chǔ)為上述代碼生成的字符串可能會(huì)很有用.

                  You can use this if you want to store the date as a string in RFC 3339/ISO 8601 format in the plist (or alternatively, if you need to convert a NSDate to a string for transmission to your web service). As noted above, the default plist format does not preserve fractions of a second for NSDate objects, so if that's critical, storing dates as strings as generated by the above code can be useful.

                  這個(gè)日期格式化程序可用于將日期轉(zhuǎn)換為字符串(使用 stringFromDate),以及將正確格式化的字符串轉(zhuǎn)換為 NSDate 對(duì)象(使用 dateFromString).

                  And this date formatter can be used for converting dates to strings (using stringFromDate), as well as converting properly formatting strings to NSDate objects (using dateFromString).

                  這篇關(guān)于這些日期是什么類(lèi)型的?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                  CLLocation returning negative speed(CLLocation 返回負(fù)速度)
                  Locations in Core Data sorted by distance via NSFetchedResultsController?(通過(guò) NSFetchedResultsController 按距離排序的核心數(shù)據(jù)中的位置?)
                  Swift: Geofencing / geolocations near user location(Swift:用戶(hù)位置附近的地理圍欄/地理位置)
                  How to get Location (latitude amp; longitude value) in variable on iOS?(如何在 iOS 上的變量中獲取位置(緯度和經(jīng)度值)?)
                  How to track the device location (iOS and Android) device using Phonegap(如何使用 Phonegap 跟蹤設(shè)備位置(iOS 和 Android)設(shè)備)

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

                    <legend id='HvsUm'><style id='HvsUm'><dir id='HvsUm'><q id='HvsUm'></q></dir></style></legend>

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

                          <tbody id='HvsUm'></tbody>
                        • <bdo id='HvsUm'></bdo><ul id='HvsUm'></ul>

                          <tfoot id='HvsUm'></tfoot>
                          • 主站蜘蛛池模板: 欧美精品一区二区三区在线播放 | 亚洲一区二区在线免费观看 | 日日夜夜天天干 | 在线观看视频中文字幕 | 国产精品国产a级 | 日韩a | 亚洲一区二区三区四区五区午夜 | 男人的天堂亚洲 | 亚洲日韩中文字幕一区 | 欧美日韩亚洲系列 | 久久99精品国产麻豆婷婷 | 成人妇女免费播放久久久 | 日韩欧美一级 | 日韩精品一二三 | 日日人人| 久久国产精品一区二区三区 | 亚洲风情在线观看 | 成年人免费在线视频 | 成人久久网 | 国产特一级黄色片 | 精品亚洲一区二区三区 | 精品国产精品三级精品av网址 | 日韩欧美在线视频一区 | 欧美精品成人一区二区三区四区 | 国产亚洲第一页 | 欧美中文一区 | 95国产精品 | 久久人人爽人人爽人人片av免费 | 99久久精品一区二区毛片吞精 | 久久免费精品视频 | 久久精品中文 | 中文字幕亚洲一区 | 国产一区亚洲 | 99热99| 欧美xxxx色视频在线观看免费 | 91精品国产91久久久久久 | 精品久久久久久久久久久 | 精品国产一区二区三区久久 | 亚洲国产自产 | 久久久资源 | 亚洲精品电影网在线观看 |