AnKing-VIP / exam-notifier

Exam Notifier add-on for Anki
Other
3 stars 0 forks source link

only counting weekdays #11

Open masonofa opened 1 year ago

masonofa commented 1 year ago

Problem description

Short and simple -- the exam notifier notification is only counting weekdays in the "(xx days until exam)" line. For example, if today is a Friday and my test is the next Friday, the notifier says "(5 days until exam)" when it should be 7.

All the other calculations are fine. If answering "Good" on a card that schedules it out 8 days, it still says "Next review (Good): 2 days after exam" which is fine.

The error above can be confusing if going through cards quickly. The top part of the notification is reliable but the bottom is confusing. Hopefully this should be a quick fix.

Checklist

Please replace the space inside the brackets with an x if the following items apply:

Information about your Anki set-up

Please open Anki, go to Help → About, click on "Copy Debug Info", and paste the result between the backticks below (if the button does not appear you are using an older version of Anki 2.1 and will need to update first):


    Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
    Platform: Windows 10
    Flags: frz=True ao=True sv=3
    Add-ons, last update check: 2023-02-02 21:46:29

    ===Add-ons (active)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    '' ['popup_dictionary', 0, 'None', mod]
    AMBOSS add-on ['0amboss_addon', 2022-09-08T06:45, 'None', mod]
    Add Hyperlink ['318752047', 2022-05-23T07:16, 'None', '']
    Additional Card Fields Fork for 21 ['744725736', 2022-10-23T04:10, 'None', mod]
    Advanced Browser ['874215009', 2022-09-26T18:28, 'None', '']
    Anki Simulator ['817108664', 2021-08-07T13:24, 'None', '']
    AnkiHub ['1322529746', 2023-02-01T03:48, 'None', '']
    Ankimote - remote to control Anki from your phone ['149004221', 2021-08-11T10:57, 'None', '']
    Batch Editing ['291119185', 2019-09-19T11:04, 'None', '']
    BetterSearch ['1052724801', 2022-01-25T15:25, 'None', mod]
    Browser Resizer ['1435775540', 2021-08-01T15:11, 'None', '']
    Browser TableEditor side-by-side horizontal split ['831846358', 2022-01-25T15:11, 'None', mod]
    Clickable Tags v20 ['1739176371', 2022-01-30T15:58, 'None', '']
    Contanki - Controller Support for Anki beta ['1898790263', 2023-02-01T18:04, 'v0.9.2-beta', '']
    Convert Subdecks to Tag Hierarchy ['1172858842', 2020-02-23T15:03, 'None', '']
    Custom Background Image and Gear Icon ['1210908941', 2023-01-11T12:47, 'None', mod]
    Customize Keyboard Shortcuts ['24411424', 2022-09-14T03:12, 'None', mod]
    Exam Notifier ['236593452', 2023-01-19T10:12, 'None', '']
    Extended Card Stats During Review ['1008566916', 2017-08-29T12:59, 'None', '']
    Extended Tag AddEdit Dialog ['1135507717', 2022-03-13T04:41, 'None', mod]
    Fastbar- with nightmode support ['46611790', 2023-01-19T06:57, 'None', '']
    Free Weekend - or Any Other Day ['742185195', 2020-04-10T05:57, 'None', mod]
    High Yield Tags ['1918380616', 2023-01-10T12:14, 'None', mod]
    Highlight Search Results in the Browser ['225180905', 2021-03-10T10:06, 'None', '']
    Hint Hotkeys ['1844908621', 2017-08-29T12:53, 'None', '']
    Image Editor ['307397307', 2022-09-07T22:09, 'None', '']
    Image Occlusion Enhanced ['1374772155', 2022-04-09T01:15, 'None', '']
    Image Style Editor ['1593969147', 2021-12-17T00:01, 'None', mod]
    ImageResizer ['1214357311', 2022-07-15T07:05, 'None', '']
    Learning Step and Review Interval Retention ['1949865265', 2022-08-28T14:21, 'None', '']
    More Decks Stats and Time Left ['1556734708', 2022-10-09T06:05, 'None', mod]
    More Overview Stats 21 ['738807903', 2021-07-30T13:13, 'None', mod]
    Placeholder- KoST ['907028815', 2022-03-04T09:59, 'None', '']
    Pokmanki ['1041307953', 2022-12-05T00:29, 'None', mod]
    Progress Bar ['2091361802', 2019-03-02T19:27, 'None', '']
    Quick Colour Changing ['2491935955', 2022-07-23T22:29, 'None', mod]
    Rebuild All  Empty All for Anki 21 ['1810938259', 2018-07-19T22:40, 'None', '']
    Reset Ease ['947935257', 2020-12-27T07:59, 'None', '']
    Resize images in editor ['1103084694', 2021-07-19T00:35, 'None', mod]
    Review Heatmap ['1771074083', 2022-06-29T19:43, 'None', '']
    Special Fields ['1102281552', 2022-11-21T18:49, 'None', mod]
    Speed Focus Mode auto-alert auto-reveal auto-answer ['1046608507', 2019-06-02T03:11, 'None', '']
    Straight Reward ['957961234', 2022-03-31T13:37, 'None', '']
    Symbols As You Type ['2040501954', 2022-06-07T22:09, 'None', '']
    Symbols ['1461102936', 2019-04-23T07:37, 'None', mod]
    The KING of Button Add-ons ['374005964', 2022-12-19T18:21, 'None', mod]
    True Retention ['613684242', 2017-11-19T13:43, 'None', '']
    Web Browser - Search terms Import texts and images automatically ['864545277', 2022-08-02T14:49, 'None', mod]
    add-on dialog searchfilter bar ['561945101', 2021-12-05T13:28, 'None', '']
    when is next learning card due today due ['563204849', 2021-12-06T08:06, 'None', mod]

    ===IDs of active AnkiWeb add-ons===
    1008566916 1041307953 1046608507 1052724801 1102281552 1103084694 1135507717 1172858842 1210908941 1214357311 1322529746 1374772155 1435775540 1461102936 149004221 1556734708 1593969147 1739176371 1771074083 1810938259 1844908621 1898790263 1918380616 1949865265 2040501954 2091361802 225180905 236593452 24411424 2491935955 291119185 307397307 318752047 374005964 46611790 561945101 563204849 613684242 738807903 742185195 744725736 817108664 831846358 864545277 874215009 907028815 947935257 957961234

    ===Add-ons (inactive)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    '' ['put_ALL_due_learning_cards_first', 0, 'None', '']
    Anki Zoom ['538879081', 2020-04-03T18:20, 'v1.1.3', '']
    Collapsible Fields ['1896168623', 2021-08-28T15:45, 'None', '']
    Load Balanced Scheduler ['208879074', 2019-07-23T20:37, 'None', '']
    Mini Format Pack ['295889520', 2019-03-01T20:13, 'None', '']
    Picmonic Anki Add-On ['40737180', 2022-06-14T15:35, 'None', mod]
    Puppy Reinforcement ['puppy_reinforcement', 2020-02-05T00:16, 'None', '']
    Stats Plus ['1009670238', 2021-03-04T05:23, 'None', '']
    Syllabus - Anki Statistics and Export by Tag and Deck ['668156440', 2020-01-19T12:52, 'None', mod]
    Wrapper meta-addon ['396502676', 2022-06-18T12:31, 'None', '']
AnKingMed commented 8 months ago

@abdnh I haven't confirmed this but seems reasonable to look into

abdnh commented 8 months ago

I can't reproduce this. The code has no special handling for weekdays at all. Can you reproduce it without add-ons? You have some add-ons that could affect scheduling like "Free Weekend".