-
Notifications
You must be signed in to change notification settings - Fork 38
refactor: moving time methods to ModLoaderTime
#346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
53d7ca5
76505f1
364600c
c66631d
4f82dd9
a73641f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,17 @@ | ||||||||||||
extends Node | ||||||||||||
|
||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One empty line missing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The empty line is still missing. |
||||||||||||
class_name ModLoaderTime | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also please add a short comment above the |
||||||||||||
|
||||||||||||
# Returns the current time as a string in the format hh:mm:ss | ||||||||||||
static func _get_time_string() -> String: | ||||||||||||
AlajeBash marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||
var date_time := Time.get_datetime_dict_from_system() | ||||||||||||
return "%02d:%02d:%02d" % [ date_time.hour, date_time.minute, date_time.second ] | ||||||||||||
|
||||||||||||
AlajeBash marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||
# Returns the current date as a string in the format yyyy-mm-dd | ||||||||||||
static func _get_date_string() -> String: | ||||||||||||
AlajeBash marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||
var date_time := Time.get_datetime_dict_from_system() | ||||||||||||
return "%s-%02d-%02d" % [ date_time.year, date_time.month, date_time.day ] | ||||||||||||
|
||||||||||||
# Returns the current date and time as a string in the format yyyy-mm-dd_hh:mm:ss | ||||||||||||
static func _get_date_time_string() -> String: | ||||||||||||
AlajeBash marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||
return "%s_%s" % [ _get_date_string(), _get_time_string() ] |
Uh oh!
There was an error while loading. Please reload this page.