Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
A class for local time.Not compatible with DST.How to use# Create objectvar t = LocalTime.now()# Setter / Gettert.day = 15print(t.month)# Add timet.add_days(100)t.hour += 48# Formatprint(t.format("{lweekday}, {month}/{day}/{year}"))
LocalTime for Godot Engine 4
A class for local time.
Not compatible with DST.
How to install
(1) Download ZIP file
[ Code ](green button) > Download ZIP
(If you want all files, please use git clone)
(2) Copy file
Copy from (unzipped file)/addons/local_time/local_time.gd
to (your project)/(anywhere)/
How to use
# Create object
var t = LocalTime.now()
# Setter / Getter
t.day = 15
print(t.month)
# Add time
t.add_days(100)
t.hour += 48
# Format
print(t.format("{lweekday}, {month}/{day}/{year}"))
See also class documents.
Script tab > Search Help > LocalTime
Versions
- 1.0.0: First version.
A class for local time.
Not compatible with DST.
How to use
# Create object
var t = LocalTime.now()
# Setter / Getter
t.day = 15
print(t.month)
# Add time
t.add_days(100)
t.hour += 48
# Format
print(t.format("{lweekday}, {month}/{day}/{year}"))
Reviews
Quick Information
A class for local time.Not compatible with DST.How to use# Create objectvar t = LocalTime.now()# Setter / Gettert.day = 15print(t.month)# Add timet.add_days(100)t.hour += 48# Formatprint(t.format("{lweekday}, {month}/{day}/{year}"))