Created
October 21, 2021 22:57
-
-
Save AnKingMed/dd9ca4b56e15d97758de1476a860500a to your computer and use it in GitHub Desktop.
This is code that can be placed on Anki Cards to help
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="font-size:20px;color:#F2E48E;font-family:Times; | |
font-style:italic;letter-spacing:-2px;position:fixed;bottom:50px; | |
left:5px;opacity:.9;"> | |
<div class="editcloze"> | |
Ease: {{info-Factor:}} | |
</div> | |
<span id="countdown2"></span> | |
<script> | |
// ###### CUSTOMIZE DATE HERE ###### | |
var dateText= 'June 18 2022'; | |
var now = new Date().getTime(); | |
var targetDate= new Date(dateText).getTime(); | |
var dist = targetDate- now; | |
var days = ((dist / (1000 * 60 * 60 * 24))/30).toFixed(1); | |
document.getElementById('countdown2').innerHTML = days; | |
</script>m (<span id="countdown"></span> | |
<script> | |
var now = new Date().getTime(); | |
var targetDate= new Date(dateText).getTime(); | |
var dist = targetDate- now; | |
var days = Math.ceil(dist / (1000 * 60 * 60 * 24)); | |
document.getElementById('countdown').innerHTML = days; | |
</script>d) | |
</div> |
Best way is just to use a different note type for each exam unfortunately.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm currently studying in high school and I have a few subjects. I have different public exam dates for different subjects. However, I am using the same note type for different flashcards in different decks(each deck is a subject). so if I set the var dateText to a particular exam date, that would be the wrong date for other subjects. Is there anyway to solve this? Thanks!