æ¥ä»ãã©ã¼ããã yyyy 㨠YYYY ã®éã
çµè«
ã¾ãæåã«æ¥ãã§ã人åãã«çµè«ãå ã«æ¸ãã¦ããã¾ãã2ã¤ã®éãã¯ä»¥ä¸ã®æ§ã«æã£ã¦ãã¾ãã
yyyy
å¹´(西æ¦)ãåºå
YYYY
ããå¹´ã«ããããæåã®æ¨ææ¥ãå«ãé±ãããã®å¹´ã®ç¬¬1é±ã§ãããã¨ããã«ã¼ã«ã§å¹´(西æ¦)ãåºåã
ä¾ãã° 2015/1/1 ã¯æ¨ææ¥ãªã®ã§ãã®é±ã®æ¥ã¯æ¥ææ¥ãåææ¥ã¾ã§å
¨ã¦2015å¹´ã®ç¬¬1é±ã¨ãã解éã«ãªãã¾ãããã®å ´åã«ã¯2014å¹´ã§æãã 2014/12/28(æ¥æ)ã2014/12/31(æ°´æ) ã®æã§ã YYYY ã§ã¯ 2015 ãè¿ãã¾ãã
ãã£ãã
Podcast 㧠Rebuild の第73回ãè´ãã¦ãããæ¥ä»ãã©ã¼ããã㧠yyyy ã§ã¯ãªããYYYY ã使ã£ãçºã« Twitter ã® Android ã¯ã©ã¤ã¢ã³ãã§ä¸å
·åãåºãã¨ãã話ãåºã¦ãã¾ããã
â»æ ¹æ¬çãªåå ã¯ãã®ã«ã¼ã«ã§ãµã¼ãå´ãå®è£
ããã¦ããçºã Android ã¯ã©ã¤ã¢ã³ãã§æ£ããèªè¨¼å¦çãè¡ãããªãã£ãã¨ããæµãã«ãªãã¾ããèªåã® iPhone ã§ä¸»ã«ä½¿ã£ã¦ãã Twitter ã¯ã©ã¤ã¢ã³ãã® Echofon ã§ãåæ§ã« OAuth ã®èªè¨¼ã«å¤±æããã¨ããçç¶ãåºã¦ãã¾ããã
ãã®çç¶ã Objective-C ã§ã¯ã©ããªãã®ã以ä¸ã®æ§ãªããã°ã©ã ã§æ¤è¨¼ãã¦ã¿ã¾ããã
â»ã¾ãã Podcast ã®ä¸ã§ã¯ Objective-C ã§ãåæ§ã«çç¶ãåºãã¨è©±ããã¦ã¾ãããã
NSDateFormatter *inputDateFormatter = [[NSDateFormatter alloc] init]; [inputDateFormatter setDateFormat:@"yyyy/MM/dd HH:mm:ss"]; NSString *intputDateStr = @"2014/12/28 00:00:00"; NSDate *inputDate = [inputDateFormatter dateFromString:intputDateStr]; NSDateFormatter *outputDateFormatter = [[NSDateFormatter alloc] init]; NSString *outputDateFormatterStr = @"YYYY/MM/dd HH:mm:ss"; [outputDateFormatter setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"JST"]]; [outputDateFormatter setDateFormat:outputDateFormatterStr]; NSString *outputDateStr = [outputDateFormatter stringFromDate:inputDate]; NSLog(@"%@ -> %@", intputDateStr, outputDateStr);
â» Podcast ã§ã¯ %G ã®è©±ãåºã¦ãã¾ããã Objective-C 㧠G ã使ã£ãå ´åã«ã¯ A.D ã è¥¿æ¦ ãªã©ã®æååãè¿ãã¨ããå¥ã®ã«ã¼ã«ã¨æã£ã¦ããã®ã§ãã®è¾ºãã®æ¤è¨¼å¦çã¯å«ã¾ãã¦ãã¾ããã
ããã°ã©ã ã®å 容㯠2014/12/28 00:00:00 ã YYYY/MM/dd HH:mm:ss ã§ãã¼ã¹ããã¨ãããã®ã§ããã³ã¬ãå®è¡ããæããã¼ã¹å¾ã®ãã¼ã¿ã¯ 2015/12/28 00:00:00 ã Objective-C ã§ã確ãã«åæ§ã®çç¶ã¨ãªãæ§ã§ã( Mac/iOS ã¨ãã«åãçç¶ã§ãã)ã
å ã¿ã« Objecitve-C ( NSDateFormatter ) ã§æå®ããæ¥ä»ãã©ã¼ããã㯠ISO ã§ã¯ç¡ãã Unicode ã®ãã©ã¼ããããæ¡ç¨ããã¦ãã¾ãã
Data Formatting Guide: Date Formatters
https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/DataFormatting/Articles/dfDateFormatting10_4.html
ã¾ãã Unicode ã®ãã©ã¼ãããã§ã YYYY 㯠ISO 8601 ãæ¡ç¨ããã¦ãã¿ããã§ããã
UTS #35: Unicode LDML: Dates
http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Field_Symbol_Table
ãªãã YYYY ã®ã«ã¼ã«ã¯ãã¡ãã
ããå¹´ã«ããããæåã®æ¨ææ¥ãå«ãé±ãããã®å¹´ã®ç¬¬1é±ã§ããããã¨è¦å®ããã¦ããã
â»æ¥ææ¥ãé±ã®å§ãã¨ãã¦å¦çã
ISO 8601 - Wikipedia
http://ja.wikipedia.org/wiki/ISO_8601#.E5.B9.B4.E3.81.A8.E9.80.B1.E3.81.A8.E6.9B.9C.E6.97.A5
yyyy ãæ³å®ãã¦ããæã®ãã¹ã
èªåãä½ã£ãããã°ã©ã ãã¡ãã㨠yyyy ã®æ¹ã®ã«ã¼ã«ã§åãã¦ããã確èªããçºã«ã¯å¢çã®å¤ãæ°´æã¨æ¨æã1/1ã¨ãªã以ä¸ã®2ã¤ã®å¤ããã¹ãããæã«å¹´ã次ã®ç¿å¹´ã«å¤æãããªããã°è¯ãã§ãããã
- 2013/12/31 00:00:00
- 2014/12/31 00:00:00
â» 2014/1/1 ãæ°´ææ¥ã 2015/1/1 ãæ¨ææ¥ã
YYYY ãæ³å®ãã¦ããæã®ãã¹ã
- 2013/12/28 00:00:00
- 2013/12/29 00:00:00
â» 2013/12/29 (æ¥ææ¥)ãã2014å¹´ã®ç¬¬1é±ããªã®ã§ 2013/12/28 㯠2013 ã 2013/12/29 㯠2014 ã¨ãªãã°æ£ããå¦çã§ãã¦ãã¾ãã
YYYY ãªãã¦ã©ããªæã«ä½¿ãã®ï¼
YYYY ã¯ã©ããªæã«ä½¿ãã®ï¼ã¨ãã声ãä¸ãã£ã¦ããã®ã§ããã¡ãã«ã¤ãã¦ã調ã¹ã¦ã¿ã¾ãããããã¨ä»¥ä¸ã®ãµã¤ãã§ã¨ã¼ãããã§ãã使ããã¦ãã¿ããã ã¨ããäºãå¤æãã¾ããã
ISO-8601 and related - SwedeTeam
http://www.swedeteam.com/iso8601/
ä¾ãã°ã00W09ãã¨ãã¦è£½é ã³ã¼ããè¨è¼ããã¦ããã° 00W09 â 2000-W09 â 2000å¹´ã®ç¬¬9é±ç®ã«è£½é ããããã®ã¨ãã表ç¾ããããããã§ãã
ãã®ä»¶ã¨ã¯é¢ä¿ãªãã§ãããã®ãã¼ã¸ã«è¨è¼ããã¦ãã MM-DD-YYYY ã¨ããå¹´ææ¥ã¯ USA ã ãã§ä½¿ããã¦ããã¨ãã話ãä¸ã èå³æ·±ãã£ãã§ãããªãã§ãããªä¸¦ã³ã«ãªã£ã¦ããã®ããçãã¯ãã¾ã£ããçç±ç¡ããå®å ¨ã«éè«ççãã ããã§ãw
é¢é£æ å ±
If you're using YYYY in your JVM service or %G in anything, fix it now | Hacker News
https://news.ycombinator.com/item?id=8810157
Twitter skips most of 2015, locks users out of Android app | ZDNet
http://www.zdnet.com/article/twitter-skips-most-of-2015-locks-users-out-of-android-app/