yb66 / tickle

Natural language parser for recurring events

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is there a way to serialize the Tickle object so I can retrieve from a DB and get the next_occurrence

angelacode opened this issue · comments

I want to store the Tickle object in a database.

Every time I retrieve that object from the database, say, every week, I would run the next occurrence and get that week's new occurrence.

Is there a way to do that?

HI @angelacode

I hadn't thought about it, to be honest. I guess you could always use Marshal.dump and load, and probably encode to and from base64 to avoid problems. The other way is obviously to keep the initial query, re-run it and it should provide the next occurence with the next key.

Thought is going into a better representation for a Tickle object, so I'll take this into account.

Regards,
iain

Hi, actually, it does make sense to just store the tickle expression and not worry about the object. So there's no need to do that in retrospect. Thanks for getting back to me.

Also: noticed that it seems to allow time of day, as well? which is awesome -- documentation says it doesn't though. Thanks.

Glad you are sorted. If you can point me to the bit in the docs that's wrong, that would be helpful.

iain

looks like time is not consistently parsed for setting the next_occurrence

I'm looking into it now. I'll let you know what I find.

I see you've opened an issue for, thanks. #17