Skip to content
Snippets Groups Projects
Commit 5b1d415a authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

If passing a non-zero integer, display logons from that many days ago

Similar to -y option, but supports going further back than just yesterday.
parent 9cb2d51a
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
......@@ -54,6 +54,8 @@ var days_ago = 0;
var day = options.today || "Today";
if(argv.indexOf('-y') >= 0)
days_ago = 1, day = options.yesterday || "Yesterday";
else if(parseInt(argv[0]) > 0)
days_ago = parseInt(argv[0]), day = days_ago + " days ago";
// Returns true on success, string on error
function print(hdr, num, days_ago)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment