diff options
| author | 2016-12-20 14:11:06 +0000 | |
|---|---|---|
| committer | 2016-12-20 14:11:16 +0000 | |
| commit | cb41b9be37866d501f16f2743a49ee4f2ce6c2b3 (patch) | |
| tree | 76055ecb0c77d6e25ad48dbe0004d4b6ad1533ff | |
| parent | NR: Train division information for services, simple '*' filtering for arrivals (diff) | |
| signature | ||
NR: Remove unused span/countdown code
| -rw-r--r-- | modules/nr.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/modules/nr.py b/modules/nr.py index cb5d4211..95c2a85b 100644 --- a/modules/nr.py +++ b/modules/nr.py @@ -29,25 +29,6 @@ class Module(object): help="Get information for a given headcode/UID/RID (Powered by NRE)", usage="<headcode>") - def time_compare(self, one, two): - return (one.hour - two.hour) * 60 + (one.minute - two.minute) - - def span(self, gen, std, etd, human=True): - expected = std - if etd.replace(":", "").isdigit(): - expected = etd - elif etd != "On time": - return etd - - time_due = datetime.datetime.strptime(expected, "%H:%M") - time_until = self.time_compare(time_due.time(), gen.time()) - - if time_until == 0: human_time = "due" - else: human_time = "in %s min" % time_until - - if human: return human_time - else: return time_until - def arrivals(self, event): colours = [Utils.COLOR_LIGHTBLUE, Utils.COLOR_GREEN, Utils.COLOR_RED] |
