dt_ansi_to_julian (public)

 dt_ansi_to_julian year month day [ era ]

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

Parameters:
year (required)
month (required)
day (required)
era (optional)
this argument is obsolete and passing it to the proc will generate a warning.
Returns:
the ANSI date as Julian or -1 in the case of an invalid ANSI date argument (year less than 4713 BCE, greater than 9999 CE, or equal to 0)

Partial Call Graph (max 5 caller/called nodes):
%3 test_dt_ansi_to_julian dt_ansi_to_julian (test acs-datetime) dt_ansi_to_julian dt_ansi_to_julian test_dt_ansi_to_julian->dt_ansi_to_julian ad_log ad_log (public) dt_ansi_to_julian->ad_log dt_ansi_to_julian_single_arg dt_ansi_to_julian_single_arg (public) dt_ansi_to_julian_single_arg->dt_ansi_to_julian dt_get_info dt_get_info (public) dt_get_info->dt_ansi_to_julian dt_widget_month dt_widget_month (public, deprecated) dt_widget_month->dt_ansi_to_julian packages/calendar/www/view-list-display.tcl packages/calendar/ www/view-list-display.tcl packages/calendar/www/view-list-display.tcl->dt_ansi_to_julian packages/calendar/www/view-month-display.tcl packages/calendar/ www/view-month-display.tcl packages/calendar/www/view-month-display.tcl->dt_ansi_to_julian

Testcases:
dt_ansi_to_julian
Source code:
    if {$era ne ""} {
        ad_log warning "'era' argument is obsolete"
    }

    try {
        return [clock format [clock scan ${year}-${month}-${day} -format %Y-%m-%d] -format %J]
    } on error {errmsg} {
        ad_log warning "Cannot convert ${year}-${month}-${day} to Julian date: $errmsg"
        return -1
    }
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: