开发者

Remove dash from list of dates

开发者 https://www.devze.com 2023-02-03 12:06 出处:网络
I have a list of dates that are all formatted as such: 04-12 05-03 I want to remove the dash and put a slash (/).

I have a list of dates that are all formatted as such:

04-12
05-03

I want to remove the dash and put a slash (/).

I tried .replace("-", "/"); and .replace(/开发者_如何学C-/, \/);

Any advice?


Try:

.replace("-", "/");

Hmmm, and there's an annoying min character requirement for answers...

EDIT:

and yes .replace does work: http://jsfiddle.net/karim79/yGWgn/1/

0

精彩评论

暂无评论...
验证码 换一张
取 消