Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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]).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue