Ejemplo 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
Ejemplo 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
Ejemplo n.º 3
0
def parseTimezone(timezone):
    timezone = helpers.removeWhitespace(timezone)
    timezone = helpers.removeWikipediaReferences(timezone)
    # timezone = re.sub(r"\[.*\]","", timezone)
    return timezone
Ejemplo n.º 4
0
def parseCity(city):
    city = helpers.removeWhitespace(city)
    city = helpers.removeWikipediaReferences(city)
    # city = re.sub(r"\[.*\]","", city)
    return city
Ejemplo n.º 5
0
def parseCountry(country):
    country = helpers.removeWhitespace(country)
    country = helpers.removeWikipediaReferences(country)
    # country = re.sub(r"\[.*\]","", country)
    return country
Ejemplo n.º 6
0
def parseAbbr(abbr):
    abbr = helpers.removeWhitespace(abbr)
    abbr = helpers.removeWikipediaReferences(abbr)

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

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