Search found 2 matches
- Wed Aug 28, 2019 11:42 am
- Forum: Ren'Py Questions and Announcements
- Topic: Strftime and conditionals for a calendar [Solved]
- Replies: 4
- Views: 635
Re: Strftime and conditionals for a calendar
init python: import datetime class GameTime: def __init__(self, dt="01 Jan 2018"): self._dt = datetime.datetime.strptime( dt, "%d %b %Y" ) def alter(self, **kwargs): self._dt += datetime.timedelta( **kwargs ) def __repr__(self): return _strftime("%A, %d %b %Y %H:%M", s...
- Wed Aug 28, 2019 11:29 am
- Forum: Ren'Py Questions and Announcements
- Topic: Strftime and conditionals for a calendar [Solved]
- Replies: 4
- Views: 635
Strftime and conditionals for a calendar [Solved]
I got the calendar code from the renpy cookbook and played around with it a bit: init python: import datetime class GameTime: def __init__(self, dt="01 Jan 2018"): self._dt = datetime.datetime.strptime( dt, "%d %b %Y" ) def alter(self, **kwargs): self._dt += datetime.timedelta( *...