template::util::date::init (public)

 template::util::date::init

Defined in packages/acs-templating/tcl/date-procs.tcl

Sets up some initial variables and other conditions to facilitate the data structure template::util::date working properly and completely.

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-templating/tcl/date-init.tcl packages/acs-templating/ tcl/date-init.tcl template::util::date::init template::util::date::init packages/acs-templating/tcl/date-init.tcl->template::util::date::init _ _ (public) template::util::date::init->_

Testcases:
No testcase defined.
Source code:
    variable month_data
    variable fragment_widgets
    variable fragment_formats
    variable token_exp

    array set month_data {
        1 {January Jan 31}
        2 {February Feb 28}
        3 {March Mar 31}
        4 {April Apr 30}
        5 {May May 31}
        6 {June Jun 30}
        7 {July Jul 31}
        8 {August Aug 31}
        9 {September Sep 30}
        10 {October Oct 31}
        11 {November Nov 30}
        12 {December Dec 31}
    }

    # Forward lookup

    # Bug# 1176
    array set fragment_widgets  [list  YYYY [list dateFragment year 4 [_ acs-templating.Year]]  YY [list dateFragment short_year 2 [_ acs-templating.Year]]  MM [list dateFragment month 2 [_ acs-templating.Month]]  MON [list monthFragment month short [_ acs-templating.Month]]  MONTH [list monthFragment month long [_ acs-templating.Month]]  DD [list dateFragment day 2 [_ acs-templating.Day]]  HH12 [list dateFragment short_hours 2 [_ acs-templating.12-Hour]]  HH24 [list dateFragment hours 2 [_ acs-templating.24-Hour]]  MI [list dateFragment minutes 2 [_ acs-templating.Minutes]]  SS [list dateFragment seconds 2 [_ acs-templating.Seconds]]  AM [list ampmFragment ampm 2 [_ acs-templating.Meridian]]  ]

    # Reverse lookup
    foreach key [array names fragment_widgets] {
        set fragment_formats([lindex $fragment_widgets($key) 1]) $key
    }

    # Expression to match any valid format token
    set token_exp "([join [array names fragment_widgets] |])(t*)"
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: