MCPcopy Create free account
hub / github.com/6tail/lunar-java / getYearInChinese

Method getYearInChinese

src/main/java/com/nlf/calendar/Lunar.java:753–760  ·  view source on GitHub ↗

获取中文的年 @return 中文年,如二零零一

()

Source from the content-addressed store, hash-verified

751 * @return 中文年,如二零零一
752 */
753 public String getYearInChinese() {
754 String y = year + "";
755 StringBuilder s = new StringBuilder();
756 for (int i = 0, j = y.length(); i < j; i++) {
757 s.append(LunarUtil.NUMBER[y.charAt(i) - '0']);
758 }
759 return s.toString();
760 }
761
762 /**
763 * 获取中文的月

Callers 1

toStringMethod · 0.95

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected