Web scraping: Difference between revisions

m
Line 1,489:
if string(res) then
timedate td = parse_date_string(res, {"Mmm. d, hh:mm:ss"})
?format_timedate(td,"h:mpm[DT_YEAR] Mmmm= ddth"date()[DT_YEAR]
?format_timedate(td,"h:mpm Dddd Mmmm ddth")
?format_timedate(date(),"h:mpm Dddd Mmmm ddth")
end if
else
Line 1,498 ⟶ 1,500:
{{out}}
<pre>
"Apr. 26, 12:2438:1118"
"12:24pm38pm Friday April 26th"
"1:38pm Friday April 26th"
</pre>
The last line differs because it is British Summer Time here.<br>
Note that since that webpage has no year, td[DT_YEAR] will be 0, (youand couldwithout of course just setsetting it from date()[DT_YEAR]), andas henceshown the weekday would also be wrong.
 
=={{header|PHP}}==
7,820

edits