Commit 626a818c authored by Landon DeCoito's avatar Landon DeCoito

moved some stuff around i think

parent 45ed3dd9
......@@ -26,23 +26,6 @@ class eventException: #this class is just an exception for our use
def __str__(self):
return self.__message
def doTheTime(strin):
strin = strin.replace(" ", "")
strin = strin.split("-")
returnlist = ["",""]
try:
returnlist[1] = convertTime(strin[1])
except ValueError:
raise eventException(str(strin))
if not (strin[0][-2:] == "am") and not (strin[0][-2:] == "pm"):
if (strin[1][-2:] == "am"):
returnlist[0] = convertTime(strin[0] + "am")
else:
returnlist[0] = convertTime(strin[0] + "pm")
else:
returnlist[0] = convertTime(strin[0])
return returnlist
#convertTime accepts strings in the form of ""
def convertTime(stri): #this function is used for splicing the event times.
if (stri[-2:] == "pm" or stri[-2:] == "PM"): #checks to see if the time presented is pm
......@@ -275,4 +258,4 @@ def load_data():
dictlist.append({"id":uniqueid, "error":error})
return dictlist
#everything in the house is fuzzy, stupid dogs were acting like pollinators, if that's how you even spell it
# everything in the house is fuzzy, stupid dogs were acting like pollinators, if that's how you even spell it
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment