Time for an 2014 update…

This commit is contained in:
Ingy döt Net 2014-01-17 05:32:22 +00:00
parent 372c577f83
commit 09687c4926
2520 changed files with 34227 additions and 7318 deletions

View file

@ -1,7 +1,7 @@
import std.stdio, std.string, std.net.curl, std.algorithm;
void main() {
import std.stdio, std.string, std.net.curl, std.algorithm;
foreach (line; "http://tycho.usno.navy.mil/cgi-bin/timer.pl".byLine)
if (line.length > 4 && line.indexOf(" UTC") != -1)
if (line.canFind(" UTC"))
line[4 .. $].writeln;
}

View file

@ -5,6 +5,6 @@
main() ->
inets:start(),
{ok, {_Status, _Header, HTML}} = http:request(?Url),
{ok, {_Status, _Header, HTML}} = httpc:request(?Url),
{match, [Time]} = re:run(HTML, ?Match, [{capture, all_but_first, binary}]),
io:format("~s~n",[Time]).