Mercurial > hg > horiscopes
diff V4/dParse.py @ 19:ae220e89cb3a
fixing parse bugs, and angle calculation bugs
author | DaveM |
---|---|
date | Tue, 06 Mar 2018 17:25:38 +0000 |
parents | 50a95089414d |
children | 0264a7888d54 |
line wrap: on
line diff
--- a/V4/dParse.py Mon Mar 05 14:23:45 2018 +0000 +++ b/V4/dParse.py Tue Mar 06 17:25:38 2018 +0000 @@ -8,8 +8,8 @@ import random import pdb -DEFAULT_TIME_H = None -DEFAULT_TIME_M = None +DEFAULT_TIME = None +# DEFAULT_TIME_M = None DEAULT_LOCATION = None def regulateData(dataDict): @@ -190,7 +190,6 @@ return (d,m,y) def parseTOB(T): - # pdb.set_trace() timeFlag = None T_ = T.replace('.','').lower().strip() if 'am' in T_: @@ -218,14 +217,16 @@ elif int(T) > 100: H = int(T)/100 M = int(T)%100 + else: + return None if timeFlag is not None: if timeFlag == 0: H = H%12 else: H = H%12 + 12 except ValueError: - H = DEFAULT_TIME_H - M = DEFAULT_TIME_M + return None return (H,M) +