Salamek / cron-descriptor

A Python library that converts cron expressions into human readable strings.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Days of the week and months need to be upper cased.

rehrhart opened this issue · comments

See new code with upper() below.
# convert SUN-SAT format to 0-6 format
for day_number in self._cron_days:
expression_parts[5] = expression_parts[5].upper()
expression_parts[5] = expression_parts[5].replace(self._cron_days[day_number], str(day_number))

    # convert JAN-DEC format to 1-12 format
    for month_number in self._cron_months:
        expression_parts[4] = expression_parts[4].upper()
        expression_parts[4] = expression_parts[4].replace(self._cron_months[month_number], str(month_number))

I fixed my code by upper casing the cron expression before calling your excellent code. Thanks.

  • Rick -

@rehrhart fixed in 1.2.9 and PIP updated

@Salamek thank-you.