how to parse string into a date pattern using dojo

Posted by Dojouser on Stack Overflow See other posts from Stack Overflow or by Dojouser
Published on 2010-05-18T19:29:15Z Indexed on 2010/05/19 0:50 UTC
Read the original article Hit count: 220

Filed under:
|
|

Hi, I have a value as '05/17/2010' I would like to get it as May 17, 2010 by using dojo.date.locale.I have tried using the dojo.date.locale.parse as follows :

x = '05/17/2010' var x= dojo.date.locale.parse(x, {datePattern: "MM/dd/yyyy", selector: "date"}); alert(x)

This doesnt give me the desired date pattern

I also tried replacing the pattern as datePattern : "MMMM d, yyyy" but it returns me null.

Any help highly appreciated.

Thanks

© Stack Overflow or respective owner

Related posts about dojo

Related posts about JavaScript