feat: added clock
This commit is contained in:
parent
c422a83f59
commit
c5dcf3d9d1
9 changed files with 103 additions and 1 deletions
22
scenes/clock/day.gd
Normal file
22
scenes/clock/day.gd
Normal file
|
@ -0,0 +1,22 @@
|
|||
extends Label
|
||||
|
||||
|
||||
const _weekday_converter: Dictionary[int, String] = {
|
||||
0: 'Dg.',
|
||||
1: 'Dl.',
|
||||
2: 'Dm.',
|
||||
3: 'Dc.',
|
||||
4: 'Dj.',
|
||||
5: 'Dv.',
|
||||
6: 'Ds.',
|
||||
}
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
var time: Dictionary = Time.get_date_dict_from_system()
|
||||
|
||||
var weekday: int = time['weekday']
|
||||
var month: int = time['month']
|
||||
var day: int = time['day']
|
||||
|
||||
text = "%s %02d/%02d" % [_weekday_converter[weekday], day, month]
|
Loading…
Add table
Add a link
Reference in a new issue