我如何获得一个月的名字

From the user I receive a DateTime variable. I want to get the name of the month that was entered. Is there a way to do so? (Apart from having a bunch of if statements)

评论
bsequi
bsequi

Use the intl package.

DateFormat("MMMM").format(dateTime);

点赞
评论