how to get dateformat to capitalize month and day

前端 未结 4 922
执笔经年
执笔经年 2021-01-14 10:55

I have my strings like so in my strings.xml:

EEEE
dd. MMMM         


        
4条回答
  •  北海茫月
    2021-01-14 11:21

    You can use WordUtils.capitalize(..) from commons-lang (on the result string)

    (this is in case you want to capitalize - i.e. uppercase only the first letter. Otherwise you can simpyl use .toUpperCase())

    Update: Since it appears this is android, you can open the sources of WordUtils and copy the implementation from there, rather than getting the whole library.

提交回复
热议问题