_acs-datetime__dt_prev_next_month (private)

 _acs-datetime__dt_prev_next_month

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

Partial Call Graph (max 5 caller/called nodes):
%3 aa_equals aa_equals (public) aa_log aa_log (public) aa_log_result aa_log_result (public) dt_next_month dt_next_month (public) dt_prev_month dt_prev_month (public) _acs-datetime__dt_prev_next_month _acs-datetime__dt_prev_next_month _acs-datetime__dt_prev_next_month->aa_equals _acs-datetime__dt_prev_next_month->aa_log _acs-datetime__dt_prev_next_month->aa_log_result _acs-datetime__dt_prev_next_month->dt_next_month _acs-datetime__dt_prev_next_month->dt_prev_month

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    set year 2020
    #
    # ANSI date for previous month
    #
    set month_prev {01 12 02 01 03 02 04 03 05 04 06 05 07 06 08 07 09 08 10 09 11 10 12 11}
    dict for {month prev} $month_prev {
        if {$month == 01} {
            aa_equals "Previous month to $month" "[dt_prev_month $year $month]" "[expr {$year -1}]-$prev-01"
        } else {
            aa_equals "Previous month to $month" "[dt_prev_month $year $month]" "$year-$prev-01"
        }
    }
    #
    # ANSI date for next month
    #
    set month_next {01 02 02 03 03 04 04 05 05 06 06 07 07 08 08 09 09 10 10 11 11 12 12 01}
    dict for {month next} $month_next {
        if {$month == 12} {
            aa_equals "Next month to $month" "[dt_next_month $year $month]" "[expr {$year + 1}]-$next-01"
        } else {
            aa_equals "Next month to $month" "[dt_next_month $year $month]" "$year-$next-01"
        }
    }
}} {
          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_prev_next_month (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: