# 如何将日期字符串转换为字母

**URL:** <https://meta.discourse.org/t/how-can-you-convert-the-date-string-to-letters/224501>\
**Category:** Development\
**Created:** [2022年四月16日 15:10 UTC](https://meta.discourse.org/t/how-can-you-convert-the-date-string-to-letters/224501 "2022-04-16T15:10:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Chen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/allen_chen/32/256627_2.png) [@Allen\_Chen](https://meta.discourse.org/u/Allen_Chen)\
**Post date:** [2022年四月16日 15:10 UTC](https://meta.discourse.org/t/how-can-you-convert-the-date-string-to-letters/224501/1 "2022-04-16T15:10:45Z")

</div>

我正尝试将日期字符串转换为字母，例如七月、一月……如何使用此 API 实现此目的？目前它返回：

`2022-03-04T12:01:55.132Z`

我希望它显示为四月、3。

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2022年四月16日 19:37 UTC](https://meta.discourse.org/t/how-can-you-convert-the-date-string-to-letters/224501/2 "2022-04-16T19:37:30Z")

</div>

API返回的就是这样。如果你想让它看起来不一样，你需要用你访问API的方式来处理。
