# The due date of cardsappears before the manually set date

**URL:** <https://forums.ankiweb.net/t/the-due-date-of-cardsappears-before-the-manually-set-date/31143>\
**Category:** Scheduling\
**Created:** [June 12, 2023, 8:31am UTC](https://forums.ankiweb.net/t/the-due-date-of-cardsappears-before-the-manually-set-date/31143 "2023-06-12T08:31:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MIZMU](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@MIZMU](https://forums.ankiweb.net/u/MIZMU)\
**Post date:** [June 12, 2023, 8:31am UTC](https://forums.ankiweb.net/t/the-due-date-of-cardsappears-before-the-manually-set-date/31143/1 "2023-06-12T08:31:43Z")

</div>

I found two cards that were manually scheduled for 1.2 years and 10 months. Both appear again for the review long before the date they were scheduled to appear.

> **[cards\_with\_bug.apkg](https://drive.google.com/file/d/1tEBKy6XUyYBs_eA00NOKUJbCKUHzBVX3/view?usp=sharing)**
>
> Google Drive file.

Note. I’m using a addon that was previously at [this link](https://ankiweb.net/shared/info/9947935257) and was deleted.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [June 13, 2023, 2:01pm UTC](https://forums.ankiweb.net/t/the-due-date-of-cardsappears-before-the-manually-set-date/31143/2 "2023-06-13T14:01:49Z")

</div>

Unknown add-ons and the fact that the cards could have been modified since you originally rescheduled them means it’s going to be hard to figure out the problem. If you can cause the issue to occur without add-ons and have steps to reproduce the problem, please let us know.

---

<div class="post-metadata">

**Author:** ![MIZMU](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@MIZMU](https://forums.ankiweb.net/u/MIZMU)\
**Post date:** [June 13, 2023, 9:10pm UTC](https://forums.ankiweb.net/t/the-due-date-of-cardsappears-before-the-manually-set-date/31143/3 "2023-06-13T21:10:39Z")

</div>

Thanks @dea  
(Not only for this answer, but for the entire investment in this wonder of the world)  
This is the relevant code from the aadon (after the accept in the addon window.) It seems to be calling Anki’s regular scheduler.

```auto

from aqt.operations.scheduling import forget_cards
from aqt.operations import CollectionOp

def prompt_new_interval():
    card = mw.reviewer.card
    m = MultiPrompt()
    if not m.exec():
        tooltip('canceld')
    else:
        if m.days == 0:
            forget_cards(
                parent=mw,
                card_ids=[card.id],
            ).run_in_background()
        else:
            # "Set Due Date" defaults to not adjusting the card interval, including ‘!’ will also reset the interval
            days_string = str(m.days)
            # work around old Rememorize Syntax:
            # neg: change only due (this is the new Anki default for positive ints)
            # pos: change due+ivl (old Anki default, in new Anki it also requires an "!"")
            if m.days > 0:
                days_string += "!"
            if m.days < 0:
                days_string = days_string[1:] # remove leading minus
            print(f"days_string for cid '{card.id}' is {days_string}")
            CollectionOp(mw, lambda col: col.sched.set_due_date([card.id], days_string, None)).success(lambda _: tooltip("The rescheduling has been done")).run_in_background()

        mw.reviewer._answeredIds.append(card.id)
        mw.autosave()
        mw.reset()

```

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [June 15, 2023, 8:56am UTC](https://forums.ankiweb.net/t/the-due-date-of-cardsappears-before-the-manually-set-date/31143/4 "2023-06-15T08:56:59Z")

</div>

The code you’ve quoted doesn’t look like it could cause the problem you described.

---

<div class="post-metadata">

**Author:** ![MIZMU](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@MIZMU](https://forums.ankiweb.net/u/MIZMU)\
**Post date:** [June 15, 2023, 10:47am UTC](https://forums.ankiweb.net/t/the-due-date-of-cardsappears-before-the-manually-set-date/31143/5 "2023-06-15T10:47:22Z")

</div>

That’s why I wrote the topic here. Because it was clear to me that it was not related to the addon.  
@dea I wouldn’t waste your time.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [June 16, 2023, 10:43am UTC](https://forums.ankiweb.net/t/the-due-date-of-cardsappears-before-the-manually-set-date/31143/6 "2023-06-16T10:43:30Z")

</div>

I appreciate the thought 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [July 16, 2023, 10:44am UTC](https://forums.ankiweb.net/t/the-due-date-of-cardsappears-before-the-manually-set-date/31143/7 "2023-07-16T10:44:06Z")

</div>

Closed on July 16, 2023, 10:44am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
