_acs-datetime__dt_localized_procs (private)
_acs-datetime__dt_localized_procs
Defined in packages/acs-datetime/tcl/test/acs-datetime-procs.tcl
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set _aa_export {} set body_count 1 foreach testcase_body {{ aa_run_with_teardown -rollback -test_code { # # Force the system locale to en_US. The value is # automatically reset to the previous value, since we are # running in a transaction. # lang::system::set_locale en_US set locale [lang::system::locale] set lang [string range $locale 0 1] ad_conn -set locale $locale aa_log "System locale set to $locale" # # Localized month names # set months {{January} {February} {March} {April} {May} {June} {July} {August} {September} {October} {November} {December}} aa_equals "dt_month_names: Months list" "[dt_month_names]" "$months" # # Localized month names (abbreviated) # set months_abbrev {{Jan} {Feb} {Mar} {Apr} {May} {Jun} {Jul} {Aug} {Sep} {Oct} {Nov} {Dec}} aa_equals "dt_month_abbrev: Months list (abbreviated)" "[dt_month_abbrev]" "$months_abbrev" # # ANSI date to localized date # aa_equals "dt_ansi_to_pretty: 2003-01-01 01:01:01" "[dt_ansi_to_pretty "2003-01-01 01:01:01"]" "01/01/03" aa_equals "dt_ansi_to_pretty: 2003-01-01 " "[dt_ansi_to_pretty "2003-01-01"]" "01/01/03" # # Localized name of the previous month # set month_prev {01 December 02 January 03 February 04 March 05 April 06 May 07 June 08 July 09 August 10 September 11 October 12 November} dict for {month prev} $month_prev { aa_equals "dt_prev_month_name: Previous month to $month" "[dt_prev_month_name 2020 $month]" "$prev" } # # Localized name of the next month # set month_next {01 February 02 March 03 April 04 May 05 June 06 July 07 August 08 September 09 October 10 November 11 December 12 January} dict for {month next} $month_next { aa_equals "dt_next_month_name: Next month to $month" "[dt_next_month_name 2020 $month]" "$next" } } }} { 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_localized_procs (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle