_acs-datetime__dt_date_rollover_errors (private)

 _acs-datetime__dt_date_rollover_errors

Defined in packages/acs-datetime/tcl/test/date-construction-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
aa_equals aa_equals (public) aa_log aa_log (public) aa_log_result aa_log_result (public) aa_true aa_true (public) dt_ansi_to_julian dt_ansi_to_julian (public) _acs-datetime__dt_date_rollover_errors _acs-datetime__dt_date_rollover_errors _acs-datetime__dt_date_rollover_errors->aa_equals _acs-datetime__dt_date_rollover_errors->aa_log _acs-datetime__dt_date_rollover_errors->aa_log_result _acs-datetime__dt_date_rollover_errors->aa_true _acs-datetime__dt_date_rollover_errors->dt_ansi_to_julian

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    foreach {year month day expected} {
        2020 0 1 2019-12-01
        2020 13 1 2021-01-01
        2020 14 1 2021-02-01
        2020 2 30 2020-03-01
        2020 9 0 2020-08-31
        2020 9 32 2020-10-02
        0999 12 32 1000-01-01
    } {
        aa_equals "rollover $year-$month-$day"  [dt_julian_to_ansi [dt_ansi_to_julian $year $month $day]] $expected
    }
    foreach {month days} {0 31 13 31 08 31 09 30} {
        aa_equals "month length $month" [dt_num_days_in_month 0999 $month] $days
    }
    foreach components {{bad 1 1} {2020 bad 1} {2020 1 bad} {0 1 1} {00 1 1} {000 1 1} {10000 1 1}} {
        aa_equals "invalid Julian components $components" [dt_ansi_to_julian {*}$components] -1
    }
    foreach proc {dt_next_month dt_prev_month dt_next_month_name dt_prev_month_name} {
        aa_equals "$proc invalid input" [$proc invalid 1] ""
    }
    foreach proc {dt_first_day_of_month dt_num_days_in_month} {
        aa_true "$proc propagates invalid input" [catch {$proc invalid 1}]
    }
    aa_true "invalid ANSI input still raises" [catch {dt_ansi_to_list not-a-date}]
    aa_equals "generic parsing remains supported" [lrange [dt_ansi_to_list {January 2, 2020}] 0 2] {2020 1 2}
}} {
          aa_log "Running testcase body $body_count"
          set ::__aa_test_indent [info level]
          set catch_val [catch $testcase_body msg]
          if {$catch_val != 0 && $catch_val != 2} {
              aa_log_result "fail" "dt_date_rollover_errors (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo"
          }
          incr body_count
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: