How do I make this date string less verbose? [closed]

♀尐吖头ヾ 提交于 2020-08-20 16:13:52

问题


I have an events website that displays plain text dates in a rather verbose manner, as shown below.

August 10th, 08:00AM - August 10th 08:15AM

How can I use Javascript to make this less verbose?

Something like this...

August 10th, 08:00AM - 08:15AM

To be clear the actual dates are generated and could be anything, so I suspect this problem is more than a simple character replacement thing. Nor does it follow that the date would be the same as it is in example.

I can probably rely on the character spaces and where they will be.


More Info

This is a Drupal field which is outputting a start and and end date using the same PHP date/time formatting.

Unfortunately the developer has not implemented a way of formatting the end date differently or for what treatment can be applied if the start and end date are different.

来源:https://stackoverflow.com/questions/63397859/how-do-i-make-this-date-string-less-verbose

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!