Post Reply 
date(time) python libraries
10-22-2023, 12:02 PM
Post: #1
date(time) python libraries
Hello,

Am I right that there are no date/datetime libraries available on the Prime's MicroPython?

I looked at the Help system as well as the output of
Code:
help('modules')

and could not see any related libraries besides "utime" which does something else by the looks of its member functions

How do you accomplish date/time calculations within Prime's Python environment?

Thanks!
Find all posts by this user
Quote this message in a reply
10-28-2023, 06:39 AM
Post: #2
RE: date(time) python libraries
Python for HP Prime is still in the development stage, and not everything is available. At the moment, you can use the hpprime library to reference PPL instructions.
For example:

Code:
import hpprime as h
n=365
d=h.eval('DATEADD(Date,%i)' %n)
print(d)

There are also DDAYS, DAYOFWEEK and TICKS instructions available.

Best wishes,
Piotr
Find all posts by this user
Quote this message in a reply
10-28-2023, 07:53 AM
Post: #3
RE: date(time) python libraries
(10-28-2023 06:39 AM)komame Wrote:  Python for HP Prime is still in the development stage, and not everything is available. At the moment, you can use the hpprime library to reference PPL instructions.
For example:

Code:
import hpprime as h
n=365
d=h.eval('DATEADD(Date,%i)' %n)
print(d)

There are also DDAYS, DAYOFWEEK and TICKS instructions available.

Best wishes,
Piotr

Ah, I didn't think of calling PPL routines. Thanks for the suggestion
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)