
V
Publisher
verillious
Date Time (Godot 4)
Tools
Date Time Calendar Week Month Year GDScript Overview
Datetime utils for Godot 4
This plugin has been mirrored from the Godot Asset Library.
The plugin author is in no way affiliated with Gadget.
If you are the author of this plugin and would like this mirror removed, please contact support@gadgetgodot.com.
š°ļø Godot Date Time
Datetime utils for Godot
Check out year of our lord for an example of it working in the wild!
šļø Usage
var datetime = DateTime.now()
print(datetime.strftime("%D of %B, %Y %H:%M:%S"))
> "7th of january, 2022 12:04:30"
var tomorrow = datetime.add_days(1).day
print(tomorrow)
> 8
var next_month = datetime.add_months(1).month_name
print(next_month)
> "february"
var two_months_and_a_day = datetime.add_time({"day": 1, "month": 2})
print(two_months_and_a_day)
> "2022-03-08 12:04:30"
š¢ Limitations
Currently not supported:
- Timezones
- Units smaller than a second
DateTime.from_isoformat()
with ISOFormat date strings that don't look likeYYYY-MM-DDTHH:MM:SS
orYYYY-MM-DD HH:MM:SS
(you can parse them usingDateTime.strptime()
if you know how they're formatted, though.)
š Credits
šŖ This project was created with cookiecutter and the verillious/cookiecutter-godot project template.
šØ Icon created by Freepik - Flaticon