dt_midnight_p (public)

 dt_midnight_p time

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

Check if a time is midnight. This might be replaced by clock idioms in the future, but is currently the way we decide e.g. if an event is an all-day event.

Parameters:
time
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_dt_midnight_p dt_midnight_p (test acs-datetime) dt_midnight_p dt_midnight_p test_dt_midnight_p->dt_midnight_p dt_no_time_p dt_no_time_p (public) dt_no_time_p->dt_midnight_p

Testcases:
dt_midnight_p
Source code:
    if {$time eq "00:00" || $time eq ""} {
        return 1
    }

    if {[regexp {00:00 *[aA][mM]} $time the_match]} {
        return 1
    }

    if {[regexp {12:00 *[aA][mM]} $time the_match]} {
        return 1
    }

    if {[regexp {[0-9]+-[0-9]+[0-9]+ (0?)0:0(0?)} $time the_match]} {
        return 1
    }

    if {[regexp {[0-9]+-[0-9]+ (0?)0:0(0?)} $time the_match]} {
        return 1
    }
    return 0
XQL Not present:
Generic
PostgreSQL XQL file:
packages/acs-datetime/tcl/acs-calendar-2-procs-postgresql.xql

Oracle XQL file:
packages/acs-datetime/tcl/acs-calendar-2-procs-oracle.xql

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