Skip to content

acgc99/Godot-DateChecker

Repository files navigation

Godot-DateChecker

Autoload to check if a date is valid. Time singlenton methods do bad error handling in my opinion, for example Time.get_unix_time_from_datetime_string returns 0 if the date is invalid (but rigth format), but also if it recieves 1970-01-01. With this autoload, you can determine if the date is valid first before calling Time methods.


Methods:

  • is_year_leap. Determines is a year is leap.
  • check_date. Checks if a date is valid from its year, month and day as ints. Returns OK (0) if it is valid, FAILED (1) otherwise.
  • check_date_string. Checks if a date is valid in ISO 8601 date string format (YYYY-MM-DD).
  • check_date_dict. Checks if a date is valid given a Dictionary.

I made some discussions on Godot repositories:


Assets

All non-Godot icons has been downloaded form Pictogrammers.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published