åæ¦ãµãã¼ã
via Javaã§åæ¦ããµãã¼ãããããæ票ããã @ ãªã¬ã³ã¸ãã¥ã¼ã¹
- Javaã®åæ¦ãµãã¼ã @ Thread.sleep()
- Javaã®åæ¦ãµãã¼ã @ ã¨ãããæ¾æµªè¨
Javaã®Core APIã§åæ¦ã«å¯¾å¿ãã¦ããããããã®ããã«Sunã®Bug Paradeã§æ票ããããã¨ããåãã§ããå³å¯ã«ä»æ§ãè¦å®ãããã¨æã£ãããååææ代ã¯ã©ãããã®ããã¨ãå¾®å¦ãªåé¡ãè²ã ãããããªæ°ããã¾ã*1ããã¨ããããæ治以éãã¡ããã¨åãã¦ãããã°ãå¤ãã®Javaããã°ã©ãã«ã¨ã£ã¦ç¦é³ã¨ãªãã§ããããæ¥åç³»ã§ã¯ã¾ã ã¾ã åæ¦ã®ãã¼ãºã¯å¤ãã§ãã
ã¨ãããããä»ããã«æã£åãæ©ãJavaã§ã®åæ¦å¯¾å¿ãå¿ è¦ãªããIBMã®ãªã¼ãã³ã½ã¼ã¹ã©ã¤ãã©ãªã§ããICU4Jã®ãCalendarã¯ã©ã¹ã使ãã°ã§ããã¯ãã§ããã大åããããã®æããã®å¤æãã¼ãã«ãæã£ã¦ããã¨æãã¾ãã3å¹´ãããåã«å°ã試ããã ãã§ãã¡ããã¨æ¤è¨¼ãã¦ãã¾ãããã
- Calendar Class @ ICU Userguide
æ°ã«ãªã£ãã®ã§ãã¡ãã£ã¨ICU4Jã®ã½ã¼ã¹ã確èªãcom.ibm.icu.util.JapaneseCalendarã¯ã©ã¹ã«ã以ä¸ã®ãããªãã¼ãã«ãããã¾ããã
private static final int[] ERAS = { // Gregorian date of each emperor's ascension // Years are AD, months are 1-based. // Year Month Day 645, 6, 19, // Taika 650, 2, 15, // Hakuchi 672, 1, 1, // Hakuho 686, 7, 20, // Shucho 701, 3, 21, // Taiho 704, 5, 10, // Keiun 708, 1, 11, // Wado 715, 9, 2, // Reiki 717, 11, 17, // Yoro 724, 2, 4, // Jinki 729, 8, 5, // Tempyo 749, 4, 14, // Tempyo-kampo 749, 7, 2, // Tempyo-shoho 757, 8, 18, // Tempyo-hoji 765, 1, 7, // Tempho-jingo 767, 8, 16, // Jingo-keiun ï¼ä»¥ä¸ã¤ã¥ãï¼
ã¤ãã§ã«ã3å¹´åã«è©¦ããã¨ãã®ã³ã¼ããCVSããçºæã
import com.ibm.text.*; import com.ibm.util.*; (snip) SimpleDateFormat formatter = (SimpleDateFormat)DateFormat.getInstance(new JapaneseCalendar(), Locale.JAPANESE); formatter.applyPattern("Gyå¹´Mædæ¥"); System.out.println(formatter.format(new Date()));
ããã§ããå¹³æ16å¹´10æ19æ¥ãã¨åºåããããã¯ãã§ãã
*1:ãããããGregorianCalendarã§ã¯ãã¡ã§ãã