util_AnsiDatetoPrettyDate (public, deprecated)

 util_AnsiDatetoPrettyDate sql_date

Defined in packages/acs-tcl/tcl/utilities-procs.tcl

Deprecated. Invoking this procedure generates a warning.

Converts 1998-09-05 to September 5, 1998 DEPRECATED: this proc hardcodes the date format and the language to American English. Better alternatives exist in acs-lang.

Parameters:
sql_date (required)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 dt_widget_list dt_widget_list (public, deprecated) util_AnsiDatetoPrettyDate util_AnsiDatetoPrettyDate dt_widget_list->util_AnsiDatetoPrettyDate dt_widget_week dt_widget_week (public, deprecated) dt_widget_week->util_AnsiDatetoPrettyDate ad_log_deprecated ad_log_deprecated (public) util_AnsiDatetoPrettyDate->ad_log_deprecated

Testcases:
No testcase defined.
Source code:
ad_log_deprecated proc util_AnsiDatetoPrettyDate
    set sql_date [string range $sql_date 0 9]
    if { ![regexp {(.*)-(.*)-(.*)$} $sql_date match year month day] } {
        return ""
    } else {
        set allthemonths {January February March April May June July August September October November December}

        set trimmed_month [string trimleft $month 0]
        set pretty_month  [lindex $allthemonths $trimmed_month-1]
        set trimmed_day   [string trimleft $day 0]

        return "$pretty_month $trimmed_day$year"
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/utilities-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: