<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">24 hour time shouldn’t need an AM/PM indicator.<br class=""><div class="">
<br class="Apple-interchange-newline"><span style="color: rgb(0, 0, 0); font-family: 'SF UI Text'; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none;" class="">Saagar Jha</span><br style="color: rgb(0, 0, 0); font-family: 'SF UI Text'; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: 'SF UI Text'; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: 'SF UI Text'; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">
</div>
<br class=""><div style=""><blockquote type="cite" class=""><div class="">On Aug 28, 2016, at 21:15, Zhao Xin via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:georgia,serif">It should be called 00:01:00 A.M., instead of 12:01:00 A.M. Shouldn't it?</div><div class="gmail_default" style="font-family:georgia,serif"><br class=""></div><div class="gmail_default"><div style="font-family: Menlo; margin: 0px; font-size: 11px; line-height: normal;" class=""><span style="color:rgb(187,44,162)" class="">import</span><span style="" class=""> Foundation</span></div><div style="font-family: Menlo; margin: 0px; font-size: 11px; line-height: normal; min-height: 13px;" class=""><span style="" class=""></span><br class=""></div><div style="font-family: Menlo; margin: 0px; font-size: 11px; line-height: normal;" class=""><span style="color:rgb(187,44,162)" class="">let</span><span style="" class=""> now = </span><span style="color:rgb(112,61,170)" class="">Date</span><span style="" class="">()</span></div><div style="font-family: Menlo; margin: 0px; font-size: 11px; line-height: normal;" class=""><span style="color:rgb(187,44,162)" class="">var</span><span style="" class=""> dc = </span><span style="color:rgb(112,61,170)" class="">Calendar</span><span style="" class="">.</span><span style="color:rgb(112,61,170)" class="">current</span><span style="" class="">.</span><span style="color:rgb(61,29,129)" class="">dateComponents</span><span style="" class="">([.</span><span style="color:rgb(61,29,129)" class="">year</span><span style="" class="">, .</span><span style="color:rgb(61,29,129)" class="">month</span><span style="" class="">, .</span><span style="color:rgb(61,29,129)" class="">day</span><span style="" class="">], from: </span><span style="color:rgb(79,129,135)" class="">now</span><span style="" class="">)</span></div><div style="font-family: Menlo; margin: 0px; font-size: 11px; line-height: normal; color: rgb(112, 61, 170);" class=""><span style="color:rgb(79,129,135)" class="">dc</span><span style="" class="">.</span><span style="" class="">minute</span><span style="" class=""> = </span><span style="color:rgb(39,42,216)" class="">1</span></div><div style="font-family: Menlo; margin: 0px; font-size: 11px; line-height: normal;" class=""><span style="color:rgb(187,44,162)" class="">let</span><span style="" class=""> date = </span><span style="color:rgb(112,61,170)" class="">Calendar</span><span style="" class="">.</span><span style="color:rgb(112,61,170)" class="">current</span><span style="" class="">.</span><span style="color:rgb(61,29,129)" class="">date</span><span style="" class="">(from: </span><span style="color:rgb(79,129,135)" class="">dc</span><span style="" class="">)</span></div><div style="font-family: Menlo; margin: 0px; font-size: 11px; line-height: normal;" class=""><span style="color:rgb(61,29,129)" class="">print</span><span style="" class="">(</span><span style="color:rgb(112,61,170)" class="">DateFormatter</span><span style="" class="">.</span><span style="color:rgb(61,29,129)" class="">localizedString</span><span style="" class="">(from: </span><span style="color:rgb(79,129,135)" class="">date</span><span style="" class="">!, dateStyle: .</span><span style="color:rgb(61,29,129)" class="">long</span><span style="" class="">, timeStyle: .</span><span style="color:rgb(61,29,129)" class="">long</span><span style="" class="">))</span></div><p style="font-family:Menlo;margin:0px;font-size:11px;line-height:normal" class="">






</p><div style="font-family: Menlo; margin: 0px; font-size: 11px; line-height: normal; color: rgb(0, 132, 0);" class=""><span style="" class="">// prints "August 29, 2016 at 12:01:00 AM GMT+8"</span></div><div style="font-family:georgia,serif" class=""><span style="" class=""><br class=""></span></div><div style="font-family:georgia,serif" class=""><span style="" class=""><br class=""></span></div><div class=""><font face="georgia, serif" class="">Zhaoxin</font></div></div></div>
_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></div></blockquote></div><br class=""></body></html>