Esempio n. 1
0
 def __init__(self, days=0, hours=0, minutes=0, seconds=0):
     self.total_secs = (days * 24 * 3600 + hours * 3600 + minutes * 60 +
                        seconds)
     if hours * 3600 + minutes * 60 + seconds > 0:
         total_seconds = hours * 3600 + minutes * 60 * seconds
         timedelta.__init__(total_seconds)
     else:
         super(timedelta, self)
     self.format_str = format_str = "{1:0>2}:{2:0>2}:{3:0>2}"
Esempio n. 2
0
 def __init__(self,
              days=0,
              seconds=0,
              microseconds=0,
              milliseconds=0,
              minutes=0,
              hours=0,
              weeks=0):
     timedelta.__init__(self, days, seconds, microseconds, milliseconds,
                        minutes, hours, weeks)
Esempio n. 3
0
 def __init__(self, days=0, hours=0, minutes=0, seconds=0):
     self.total_secs = (days *
                        24 * 3600 +
                        hours * 3600 +
                        minutes * 60 +
                        seconds)
     if hours * 3600 + minutes * 60 + seconds > 0:
         total_seconds = hours*3600 + minutes * 60 * seconds
         timedelta.__init__(total_seconds)
     else:
         super(timedelta, self)
     self.format_str = format_str = "{1:0>2}:{2:0>2}:{3:0>2}"
Esempio n. 4
0
    def __init__(self, hours=0, minutes=0, seconds=0):
        """
        Constructor

        :param hours:
        :type hours: int
        :param minutes:
        :type minutes: int
        :param seconds:
        :type seconds: int
        :return: instance of FirstTime
        :rtype: FirstTime
        """
        where_am_i = 'FirstTime.__init__'
        if hours < 0 or minutes < 0 or seconds < 0:
            raise ValueError(where_am_i + ' - does not allow negative values')

        timedelta.__init__(self, hours=hours, minutes=minutes, seconds=seconds)
Esempio n. 5
0
 def __init__(self, **kwargs):
     timedelta.__init__(self)
Esempio n. 6
0
 def __init__(self, days=0, seconds=0, microseconds=0,
                 milliseconds=0, minutes=0, hours=0, weeks=0):
     timedelta.__init__(self, days, seconds, microseconds,
                 milliseconds, minutes, hours, weeks)