Hi,
You need to check if 'timestamp' >=next_rep, with timestamp essentially the
current time in unix format, but with some small changes to take into account
timezones, etc.
If you want the nitty gritty, here is the Python function that calculates this
timestamp:
def adjusted_now(self, now=None):
"""Timezone information and 'day_starts_at' will only become relevant
when the queue is built, not at schedule time, to allow for
moving to a different timezone after a card has been scheduled.
Cards are due when 'adjusted_now >= next_rep', and this function
makes sure that happens at h:00 local time (with h being
'day_starts_at').
"""
if now == None:
now = time.time()
# The larger 'day_starts_at', the later the card should become due,
# i.e. larger than 'next_card', so the more 'now' should be decreased.
now -= self.config()["day_starts_at"] * HOUR
# 'altzone' or 'timezone' contains the offset in seconds west of UTC.
# This number is positive for the US, where a card should become
# due later than in Europe, so 'now' should be decreased by this
# offset.
# As for when to use 'altzone' instead of 'timezone' if daylight
# savings time is active, this is a matter of big confusion
# among the Python developers themselves:
# http://bugs.python.org/issue7229
if time.localtime(now).tm_isdst and time.daylight:
now -= time.altzone
else:
now -= time.timezone
return int(now)
Cheers,
Peter
> -----Original Message-----
> From: [email protected] [mailto:mnemosyne-
> [email protected]] On Behalf Of Alex .
> Sent: 27 March 2014 04:18
> To: [email protected]
> Subject: [mnemosyne-proj-users] How to get "Scheduled" and "Not
> memorized" with SQL?
>
> Hi,
>
> I am search decks for imformation about them to use outside of
> mnemosyne. Can someone tell me what the proper SQL to find
> "Scheduled"?
>
> I have not memorized. Its
>
> "SELECT COUNT(*) FROM cards WHERE active = 1 AND grade < 2;";
>
>
> But I need scheduled as well.. can anyone help me?
>
> --
> You received this message because you are subscribed to the Google Groups
> "mnemosyne-proj-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to mnemosyne-proj-
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mnemosyne-proj-users/7190d982-3fc8-
> 4578-ae63-262c68fd85db%40googlegroups.com
> <https://groups.google.com/d/msgid/mnemosyne-proj-users/7190d982-
> 3fc8-4578-ae63-
> 262c68fd85db%40googlegroups.com?utm_medium=email&utm_source=foo
> ter> .
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mnemosyne-proj-users/008e01cf49c9%24d5b1b0c0%2481151240%24%40UGent.be.
For more options, visit https://groups.google.com/d/optout.