嶄忽滴煽麻隈java糞? - 園殻秘壇利
作者 佚名技术
来源 NET编程
浏览
发布时间 2012-06-22
{ if (Math.abs(nextMonth)<Math.abs(chineseMonth)) chineseYear++; chineseMonth = nextMonth; chineseDate -= lastDate; lastDate = daysInChineseMonth(chineseYear, chineseMonth); nextMonth = nextChineseMonth(chineseYear, chineseMonth); } return 0; } private static int[] bigLeapMonthYears = { // 寄避埖議避定定芸 6, 14, 19, 25, 33, 36, 38, 41, 44, 52, 55, 79,117,136,147,150,155,158,185,193 }; public static int daysInChineseMonth(int y, int m) { // 廣吭?避埖 m < 0 int index = y - baseChineseYear + baseIndex; int v = 0; int l = 0; int d = 30; if (1<=m && m<=8) { v = chineseMonths[2*index]; l = m - 1; if ( ((v>>l)&0x01)==1 ) d = 29; } else if (9<=m && m<=12) { v = chineseMonths[2*index+1]; l = m - 9; if ( ((v>>l)&0x01)==1 ) d = 29; } else { v = chineseMonths[2*index+1]; v = (v>>4)&0x0F; if (v!=Math.abs(m)) { d = 0; } else { d = 29; for (int i=0; i<bigLeapMonthYears.length; i++) { if (bigLeapMonthYears[i]==index) { d = 30; break; } } } } return d; } public static int nextChineseMonth(int y, int m) { int n = Math.abs(m) + 1; if (m>0) { int index = y - baseChineseYear + baseIndex; int v = chineseMonths[2*index+1]; v = (v>>4)&0x0F; if (v==m) n = -m; } if (n==13) n = 1; return n; } private static char[][] sectionalTermMap = { {7,6,6,6,6,6,6,6,6,5,6,6,6,5,5,6,6,5,5,5,5,5,5,5,5,4,5,5}, {5,4,5,5,5,4,4,5,5,4,4,4,4,4,4,4,4,3,4,4,4,3,3,4,4,3,3,3}, {6,6,6,7,6,6,6,6,5,6,6,6,5,5,6,6,5,5,5,6,5,5,5,5,4,5,5,5,5}, {5,5,6,6,5,5,5,6,5,5,5,5,4,5,5,5,4,4,5,5,4,4,4,5,4,4,4,4,5}, {6,6,6,7,6,6,6,6,5,6,6,6,5,5,6,6,5,5,5,6,5,5,5,5,4,5,5,5,5}, {6,6,7,7,6,6,6,7,6,6,6,6,5,6,6,6,5,5,6,6,5,5,5,6,5,5,5,5,4,5,5,5,5}, {7,8,8,8,7,7,8,8,7,7,7,8,7,7,7,7,6,7,7,7,6,6,7,7,6,6,6,7,7}, {8,8,8,9,8,8,8,8,7,8,8,8,7,7,8,8,7,7,7,8,7,7,7,7,6,7,7,7,6,6,7,7,7}, {8,8,8,9,8,8,8,8,7,8,8,8 |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于嶄忽滴煽麻隈java糞? - 園殻秘壇利的所有评论