javascript - JSON Call JS Display Date formatting -
Using JSON, I was able to successfully display the file with the loop path and date through a directory
However, I'm not sure how to change the output. I just want to show months and years instead of day-to-month year. View my sample In addition to this question (if I do not want to ask this question separately, then it is definite), to capture the date I created the file wish or last modified date as I add new docs / dir / folder, so the date is finally attached to each file propounded the same ... even if you clear the last modified date January K You formatted the date You can use: $ GetJSON ( "http://www.houston.org/api/v1/forms/dir", function (data) {DatakforEach (function (o, i) {Adiand ( '& lt; div & gt; & lt ; a href = " '+ o.phath +' / '+ n.Name +'" & gt; '+ new date (o. Created) .toDateString () +' & Lt; / a & gt; & lt; / div> ';);});}); & Lt; Div id = "arChives" & gt; & Lt; / Div & gt;
moment (date (create.)). Format ('DD / MM / YYYY')
Comments
Post a Comment