【发布时间】:2013-09-18 09:13:08
【问题描述】:
我得到一个整数,我需要在当前语言环境中转换为月份名称:
语言环境 en-us 示例: 1 -> 一月 2 -> 二月
我在 gremlin 中的代码示例:
.....groupBy{[it[3], it[2].getMonth()]}{it[1]}{it.sum()}.cap().scatter().transform{[Name:it.key,Tx:it.value]}
我在这里得到:
==>{Name=[ABC, 7], Tx=1750.0}
我想要名称格式的月份整数。
我试过了,
it[2].getMonth().toString() and also as cal.get(Calendar.MONTH) etc。但没有成功。
【问题讨论】:
-
Replace("Thanks", "Acceptance").... :-)