dt_num_days_in_month (public)

 dt_num_days_in_month year month

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

Parameters:
year (required)
month (required)
Returns:
the numbers of days for the given month/year

Partial Call Graph (max 5 caller/called nodes):
%3 test_dt_num_days_in_month dt_num_days_in_month (test acs-datetime) dt_num_days_in_month dt_num_days_in_month test_dt_num_days_in_month->dt_num_days_in_month dt_get_info dt_get_info (public) dt_get_info->dt_num_days_in_month

Testcases:
dt_num_days_in_month
Source code:
    if {$month == 0} {
        set month 01
    } elseif {$month == 12} {
        incr year
        set month 01
    } elseif {$month == 13} {
        incr year
        set month 02
    } else {
        incr month
    }

    return [clock format [clock scan "last day" -base [clock scan $year-$month-01]] -format %d]
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-datetime/tcl/acs-datetime-procs.xql

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