Is there datetime, date, time... or anything like that.

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Is there datetime, date, time... or anything like that.

#1 Post by ISAWHIM »

I am having trouble locating anything related to dates, time, datetime, etc... in Python or RenPy-code.

I found some crazy-long OLD help page on some kind of "calendar" system. (Kind-of overkill and dodgy looking code for something that python has a pre-set string of functions for.)
https://www.renpy.org/wiki/renpy/doc/co ... l_Calendar

Naturally, it tells you the code is out of date, leading you back to the unrelated main-page, for an Easter-egg hunt to find something that doesn't exist.

So, I can't find anything-else related to python code, or some RenPy code.

Honestly, I think I can default back to some manual coding for this, but then I have to program all the months "days", or hand-craft a calendar formula and functions to match them.

Is there a simple way to get datetime() function from python in here?

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Is there datetime, date, time... or anything like that.

#2 Post by Divona »

If you mean Python datetime (local real time) then you can import it in: viewtopic.php?f=8&t=40687&p=430540#p430540
Completed:
Image

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: Is there datetime, date, time... or anything like that.

#3 Post by ISAWHIM »

Thanks... that worked.

I had to force a recompile. It didn't work the first time I tried to import, it said "datetime" is not defined.

Yay! Now I can get a date!... Well... a number for a date... Well... a numeric representation of a point in time.

Post Reply

Who is online

Users browsing this forum: No registered users