mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 14:48:47 +00:00
Make time.components_to_time #optional_ok
This commit is contained in:
+1
-1
@@ -916,7 +916,7 @@ This procedure calculates the time from datetime components supplied in the
|
|||||||
arguments to this procedure. If the datetime components don't represent a valid
|
arguments to this procedure. If the datetime components don't represent a valid
|
||||||
datetime, the function returns `false` in the second argument.
|
datetime, the function returns `false` in the second argument.
|
||||||
*/
|
*/
|
||||||
components_to_time :: proc "contextless" (#any_int year, #any_int month, #any_int day, #any_int hour, #any_int minute, #any_int second: i64, #any_int nsec := i64(0)) -> (t: Time, ok: bool) {
|
components_to_time :: proc "contextless" (#any_int year, #any_int month, #any_int day, #any_int hour, #any_int minute, #any_int second: i64, #any_int nsec := i64(0)) -> (t: Time, ok: bool) #optional_ok {
|
||||||
this_date, err := dt.components_to_datetime(year, month, day, hour, minute, second, nsec)
|
this_date, err := dt.components_to_datetime(year, month, day, hour, minute, second, nsec)
|
||||||
if err != .None {
|
if err != .None {
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user