_acs-templating__validate_date (private)

 _acs-templating__validate_date

Defined in packages/acs-templating/tcl/test/data-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_false aa_false (public) aa_log aa_log (public) aa_log_result aa_log_result (public) aa_true aa_true (public) template::data::validate template::data::validate (public) _acs-templating__validate_date _acs-templating__validate_date _acs-templating__validate_date->aa_false _acs-templating__validate_date->aa_log _acs-templating__validate_date->aa_log_result _acs-templating__validate_date->aa_true _acs-templating__validate_date->template::data::validate

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    #
    # date, time_of_day and timestamp are all validated by
    # template::util::date::validate.
    #
    set date_true {
        "2021 06 28"
        "2021 06 28 13 01 00"
        "2021 06 28 13 01"
        "2021 06 28 13"
    }
    set date_false {
        LALALA
        NO
        "2021-06-28 12:52:44"
        "2021_06_28"
        "2021 Jun 28"
        "2021-06-28"
        "-2021 06 28"
        "2021 -06 28"
        "2021 06 -28"
        "2021 06 38"
        "2021 16 28"
        "2021 06 28 25 01 00"
        "2021 06 28 13 71 00"
        "2021 06 28 13 01 70"
        "2021 06 28 13 01 -00"
        "2021 06 28 13 -01 00"
        "2021 06 28 -13 01 00"
        "la la"
        not,valid
        ://
    }
    set message ""
    foreach value $date_true {
        aa_true "Is $value a date?"  [template::data::validate date value message]
        aa_true "Is $value a timestamp?"  [template::data::validate timestamp value message]
        aa_true "Is $value a time_of_day?"  [template::data::validate timestamp value message]
    }
    foreach value $date_false {
        aa_false "Is $value a date?"  [template::data::validate date value message]
        aa_false "Is $value a timestamp?"  [template::data::validate timestamp value message]
        aa_false "Is $value a time_of_day?"  [template::data::validate time_of_day value message]
    }
}} {
          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" "validate_date (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: