2014-09-01ãã1ã¶æéã®è¨äºä¸è¦§
ããã«ã¡ããã¿ãã§ãã ã¨ãããããæ¥æããã°ã©ãã¼ã¨ãã¦ã AppCodeã§Swiftã®ã³ã¼ããæ¸ãã¦ã¿ããã¨ã«ãã¾ããã ãã®æã®ææ³ã¨ããããã¡ã¢ã¨ãããããªãã¨ããã⦠MAC OS X10.9ä¸ã§åãã³ã³ã½ã¼ã«ã¢ããªã±ã¼ã·ã§ã³ Swiftã»ã¨ãã©è§¦ã£ããã¨ããªãã®â¦
ããã«ã¡ããã¿ãã§ãã æè¿ããã£ã¨Java8ã®Date and Time APIãããã£ã¦ãã¾ãããã å¤åãããã§ãããã§ãã ä»æ¥ã¯æ°APIã¨å¤ãAPIã®ç¸äºå¤æã«ã¤ãã¦ã§ãã java.time.Instant æ°APIã¨å¤ãAPIã§ã®ç¸äºå¤æã¯java.time.Instantãçµç±ãã¦è¡ãã¾ãã @Ruâ¦
ããã«ã¡ããã¿ãã§ãã ããæè¿ããã£ã¦ãJava8 Date and Time APIã§ããã ä»æ¥ã¯LocalDateTimeã¨ZonedDateTimeã®ç¸äºå¤æã«ã¤ãã¦ã§ãã LocalDateTimeã¨ZonedDateTimeã®å¤æ ZonedDateTimeããLocalDateTimeã¸ã¯ã¾ã¼ã³æ å ±ãåãé¤ãã ããªã®ã§ã å¤æâ¦
ããã«ã¡ããã¿ãã§ãã ååãåã åã«å¼ãç¶ããJava8ã®Date and Time APIããããã¾ãã ä»æ¥ã¯ãæååããæ¥ä»ãåå¾ããæ¹æ³ã§ãã DateTimeFormatterã¯ã©ã¹ æååã¨TemporalAccessorã¨ãå¤æããã¯ã©ã¹ã§ãã DateTimeFormatter#format(TemporalAcceâ¦
ããã«ã¡ããã¿ãã§ãã ååã«å¼ãç¶ããJava8ã®Date and Time APIã«ã¤ãã¦æ¸ãã¦ããã¾ãã ä»åã¯ZonedDateTimeã«ã¤ãã¦æ¸ãã¾ãã ZonedDateTimeã¯ã©ã¹ ZonedDateTimeã¯ã©ã¹ã¯æ¥ææ å ±ã«å ãã¦ãæå·®æ å ±ããã¤ã¯ã©ã¹ã§ãã æåãããããããLocalDateâ¦
ããã«ã¡ããã¿ãã§ãã ããããã§ãLocalDateTimeã¨ãZonedDateTimeã 触ã£ã¦ã¦ããããã¨ãããã£ã±ããã£ãã®ã§ã ã¡ã¢ã£ã¦ã¿ã¾ããã Java8ã®Data and Time Apiã¯ããã ãã§ã¯ãªããã©ã ã¯ããã¦è§¦ã人ããããã ããç®æã«ã¨ãã¨ãã¯ã¾ã£ã¦ãã¾ãã Lâ¦