Generates a description for only the SECONDS portion of the expression

        Returns:
            The SECONDS description
482221
def get_seconds_description(self):
        

        return self.get_segment_description(
            self._expression_parts[0],
            _("every second"),
            lambda s: s,
            lambda s: _("every {0} seconds").format(s),
            lambda s: _("seconds {0} through {1} past the minute"),
            lambda s: _("at {0} seconds past the minute")
        )
529520
def time_description(self):
        """"""

        tc = [t for t in self._p.time_coverage if t]

        if not tc:
            return ''

        mn = min(tc)
        mx = max(tc)

        if not mn and not mx:
            return ''
        elif mn == mx:
            return mn
        else:
            return "{} to {}".format(mn, mx)
553490
def timedelta_div(first: datetime.timedelta,
                  second: datetime.timedelta) -> Optional[float]:
    
    first_seconds = timedelta_seconds(first)
    second_seconds = timedelta_seconds(second)

    if not second_seconds:
        return None

    return first_seconds / second_seconds
179052
def get_description(expression, options=None):
    
    descripter = ExpressionDescriptor(expression, options)
    return descripter.get_description(DescriptionTypeEnum.FULL)
271438
def get_hours_description(self):
        
        expression = self._expression_parts[2]
        return self.get_segment_description(
            expression,
            _("every hour"),
            lambda s: self.format_time(s, "0"),
            lambda s: _("every {0} hours").format(s),
            lambda s: _("between {0} and {1}"),
            lambda s: _("at {0}")
        )
502031
def hours_minutes_seconds(self):
        
        minutes, seconds = symmetric_divmod(self[2], 60)
        hours, minutes = symmetric_divmod(minutes, 60)
        return hours, minutes, float(seconds) + self[3]
457365
def get_readable_time_string(seconds):
    """"""
    seconds = int(seconds)
    minutes = seconds // 60
    seconds = seconds % 60
    hours = minutes // 60
    minutes = minutes % 60
    days = hours // 24
    hours = hours % 24

    result = ""
    if days > 0:
        result += "%d %s " % (days, "Day" if (days == 1) else "Days")
    if hours > 0:
        result += "%d %s " % (hours, "Hour" if (hours == 1) else "Hours")
    if minutes > 0:
        result += "%d %s " % (minutes, "Minute" if (minutes == 1) else "Minutes")
    if seconds > 0:
        result += "%d %s " % (seconds, "Second" if (seconds == 1) else "Seconds")

    return result.strip()
997419
def formatTime(self, record, datefmt=None):
        """"""
        _seconds_fraction = record.created - int(record.created)
        _datetime_utc = time.mktime(time.gmtime(record.created))
        _datetime_utc += _seconds_fraction
        _created = self.converter(_datetime_utc)

        if datefmt:
            time_string = _created.strftime(datefmt)
        else:
            time_string = _created.strftime('%Y-%m-%dT%H:%M:%S.%fZ')
            time_string = "%s,%03d" % (time_string, record.msecs)
        return time_string
1033289
def humanTime(seconds):
  '''
  
  '''
  intervals = ['days', 'hours', 'minutes', 'seconds']
  x = deltaTime(seconds=seconds)
  return ' '.join('{} {}'.format(getattr(x, k), k) for k in intervals if getattr(x, k))
1178485
def fasta(self):
        '''
        
        '''
        if not self._fasta:
            self._fasta = '>{}\n{}'.format(self.id, self.sequence)
        return self._fasta
957114
def seconds_to_text(secs):
    
    hours = (secs)//3600
    minutes = (secs - hours*3600)//60
    seconds = secs - hours*3600 - minutes*60
    return "%02d:%02d:%02d" % (hours, minutes, seconds)
778602
def timedelta_seconds(value: datetime.timedelta) -> int:
    
    return SECONDS_PER_DAY * value.days + value.seconds
63242
def formatDuration(self, duration):
        
        days = duration.days
        hours, remainder = divmod(duration.seconds, 3600)
        minutes, seconds = divmod(remainder, 60)
        if days:
            return '{} day{} {}h {}m {}s'.format(days, "s" if days > 1 else "",
                                                 hours, minutes, seconds)
        elif hours:
            return '{}h {}m {}s'.format(hours, minutes, seconds)
        return '{}m {}s'.format(minutes, seconds)
674561
def get_month_description(self):
        
        return self.get_segment_description(
            self._expression_parts[4],
            '',
            lambda s: datetime.date(datetime.date.today().year, int(s), 1).strftime("%B"),
            lambda s: _(", every {0} months").format(s),
            lambda s: _(", {0} through {1}"),
            lambda s: _(", only in {0}")
        )
1340165
def timedeltaToString(delta):
    
    if delta.days == 0:
        sign = 1
    else:
        sign = delta.days / abs(delta.days)
    delta = abs(delta)
    days = delta.days
    hours = int(delta.seconds / 3600)
    minutes = int((delta.seconds % 3600) / 60)
    seconds = int(delta.seconds % 60)

    output = ''
    if sign == -1:
        output += '-'
    output += 'P'
    if days:
        output += '{}D'.format(days)
    if hours or minutes or seconds:
        output += 'T'
    elif not days:  # Deal with zero duration
        output += 'T0S'
    if hours:
        output += '{}H'.format(hours)
    if minutes:
        output += '{}M'.format(minutes)
    if seconds:
        output += '{}S'.format(seconds)
    return output
896266
public NumberExpression<Integer> second() {
        if (seconds == null) {
            seconds = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.SECOND, mixin);
        }
        return seconds;
    }
112217
def get_time_of_day_description(self):
        
        seconds_expression = self._expression_parts[0]
        minute_expression = self._expression_parts[1]
        hour_expression = self._expression_parts[2]

        description = StringBuilder()

        # handle special cases first
        if any(exp in minute_expression for exp in self._special_characters) is False and \
            any(exp in hour_expression for exp in self._special_characters) is False and \
                any(exp in seconds_expression for exp in self._special_characters) is False:
            # specific time of day (i.e. 10 14)
            description.append(_("At "))
            description.append(
                self.format_time(
                    hour_expression,
                    minute_expression,
                    seconds_expression))
        elif "-" in minute_expression and \
            "," not in minute_expression and \
                any(exp in hour_expression for exp in self._special_characters) is False:
            # minute range in single hour (i.e. 0-10 11)
            minute_parts = minute_expression.split('-')
            description.append(_("Every minute between {0} and {1}").format(
                self.format_time(hour_expression, minute_parts[0]), self.format_time(hour_expression, minute_parts[1])))
        elif "," in hour_expression and "-" not in hour_expression and \
                any(exp in minute_expression for exp in self._special_characters) is False:
            # hours list with single minute (o.e. 30 6,14,16)
            hour_parts = hour_expression.split(',')
            description.append(_("At"))
            for i, hour_part in enumerate(hour_parts):
                description.append(" ")
                description.append(
                    self.format_time(hour_part, minute_expression))

                if i < (len(hour_parts) - 2):
                    description.append(",")

                if i == len(hour_parts) - 2:
                    description.append(_(" and"))
        else:
            # default time description
            seconds_description = self.get_seconds_description()
            minutes_description = self.get_minutes_description()
            hours_description = self.get_hours_description()

            description.append(seconds_description)

            if description:
                description.append(", ")

            description.append(minutes_description)

            if description:
                description.append(", ")

            description.append(hours_description)
        return str(description)