Exemplo n.º 1
0
def parseTime(time):
    time = helpers.removeWhitespace(time)
    time = helpers.removeWikipediaReferences(time)
    # time = re.sub(r"\[.*\]","", time)
    time = datetime.strptime(time, "%H:%M").time()

    return time
Exemplo n.º 2
0
def parseTZOffset(delta):
    delta = helpers.removeWhitespace(delta)
    delta = helpers.removeWikipediaReferences(delta)
    delta = delta.replace("−", "-")
    # delta = re.sub(r"\[.*\]","", delta)
    delta = timedelta(hours=float(delta))

    return delta
Exemplo n.º 3
0
def parseTimezone(timezone):
    timezone = helpers.removeWhitespace(timezone)
    timezone = helpers.removeWikipediaReferences(timezone)
    # timezone = re.sub(r"\[.*\]","", timezone)
    return timezone
Exemplo n.º 4
0
def parseCity(city):
    city = helpers.removeWhitespace(city)
    city = helpers.removeWikipediaReferences(city)
    # city = re.sub(r"\[.*\]","", city)
    return city
Exemplo n.º 5
0
def parseCountry(country):
    country = helpers.removeWhitespace(country)
    country = helpers.removeWikipediaReferences(country)
    # country = re.sub(r"\[.*\]","", country)
    return country
Exemplo n.º 6
0
def parseAbbr(abbr):
    abbr = helpers.removeWhitespace(abbr)
    abbr = helpers.removeWikipediaReferences(abbr)

    # abbr = re.sub(r"\[.*\]","", abbr)
    return abbr
Exemplo n.º 7
0
def parseName(name):
    name = helpers.removeWhitespace(name)
    name = helpers.removeWikipediaReferences(name)

    return name
Exemplo n.º 8
0
def parseDST(dst):
    dst = helpers.removeWhitespace(dst)
    dst = helpers.removeWikipediaReferences(dst)
    # dst = re.sub(r"\[.*\]","", dst)
    return dst