'Hour, 12-hour format without leading zeros; i.e. \'1\' to \'12\''

def g(self):

    if (self.data.hour == 0):
        return 12
    if (self.data.hour > 12):
        return (self.data.hour - 12)
    return self.data.hour
