简体   繁体   English

如何在本机中添加日期格式的SuperScript

[英]How to add SuperScript in date format in react native

I am trying to add SuperScript in my date format . 我正在尝试以我的日期格式添加SuperScript。

Like am getting value from server "9/5/2019" and "9th May,2019 I have to convert this into "9th May,2019" , the th should be SuperScript. 就像我从服务器“9/5/2019”和“2019年5月9日获得价值一样,我必须将其转换为”2019年5月9日“,这应该是SuperScript。

for exp 为exp

const Newdate = "9-May-2019" const Newdate =“9-May-2019”

const NewDateDormat ="9th May,2019" const NewDateDormat =“2019年5月9日”

both date I have to display both (Newdate and NewDateDormat) in "9th May,2019" this format .Here th should be "SuperScript". 两个日期我必须在“2019年5月9日”这种格式中显示(Newdate和NewDateDormat)。这应该是“SuperScript”。

当您将其插入DOM时,您可以将“th”放在“sup”标记之间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM