Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.
This repository was archived by the owner on Dec 8, 2025. It is now read-only.

Date range in Apple Order widget #75

@Bernd95

Description

@Bernd95

The widget might display weird things, if Apple offers a time range as the remaining time. If it takes Apple longer than the “from” time, the widget displays a negative remaining time.

IMG_1705

I therefore propose two improvements:
If the remaining time becomes negative, it should be set to 0 by just using something like max(0, whatever calculation). Or maybe you should set it to 1 if it is lower than 1, I’m not really sure about Apple’s logic here.
If a time range is used, the widget always uses an optimistic estimation, that is, it takes the “from” time for the calculation of the remaining time. You could offer a pessimistic estimation (selectable by some parameter in the code’s config section) by using the “to” date as the basis for the calculation of the remaining time.

I tried to make a proposal, but after looking at the code for a while I had to admit my programming skills are too weak to help. Sorry about that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions