Get Date/Time in Native Mojo
Is there a library for this? The only way I can think to implement is with a python module import.
3 Replies
Mojo has a time module
just do
import time
for the current time you can do time.now()
if you want the year/month/day i believe you'll have to import a python or C moduleno way to code this in mojo?
time.now() gives monotonic system time
not current date/time
Check out some 3rd party options at https://github.com/mojicians/awesome-mojo
The mojo stdlib is not fully built out yet.
GitHub
GitHub - mojicians/awesome-mojo: A curated list of awesome Mojo 🔥 f...
A curated list of awesome Mojo 🔥 frameworks, libraries, software and resources - GitHub - mojicians/awesome-mojo: A curated list of awesome Mojo 🔥 frameworks, libraries, software and resources