godot-extended-libraries / godot-next

Godot Node Extensions - Basic Node Extensions for Godot Engine
MIT License
957 stars 61 forks source link

DateTime class #88

Closed amoriqbal closed 1 year ago

amoriqbal commented 3 years ago

It would be nice to have a DateTime class. It will be particularly useful when working with arrays of dates or other data structures that have a date as an attribute. Expected features: Support for Gregorian calendar operations. Eg: date_time_obj_1 . days_to ( date_time_obj_2 ) returns the difference between the two DateTime objects in days.

aaronfranke commented 1 year ago

In Godot 3.5+ and Godot 4.0+, there is a new Time class that has methods for working with Gregorian calendar time in Dictionaries, Strings, and the Unix timestamp. Therefore, we don't need something in Godot Next for this. We could theoretically provide a wrapper class, but it wouldn't add much value.

https://docs.godotengine.org/en/stable/classes/class_time.html