common/helpers/Functions.php
/**
     * Function returns array of dates for search
     *
     * @return array
     */
Function returns array of dates for search
@return array
Function returns array of dates for search @return array
public static function dateInfo()
    {
        $d['today_begin'] = date('Y-m-d', time())." 00:00:00";
        $d['today_end']   = date('Y-m-d', time())." 23:59:59";
        $day_week = intval(date('N', time())); 
        $time_first_day_week = ($day_week>1) ? time() - ($day_week - 1)*86400 : time();
        $d['week_begin']  = date('Y-m-d', $time_first_day_week) ." 00:00:00";
        $d['week_end']    = date('Y-m-d', time())." 23:59:59";
        $day_month = intval(date('j', time()));
        $time_first_day_mnth = ($day_month>1) ? time() - ($day_month - 1)*86400 : time();
        $d['mnth_begin']  = date('Y-m-d', $time_first_day_mnth) ." 00:00:00";
        $d['mnth_end']    = date('Y-m-d', time())." 23:59:59";
        return $d;
    }
public static function dateInfo ( ) { $ d [ 'today_begin' ] = date ( 'Y-m-d' , time ( ) ) . "  00:00:00 " ; $ d [ 'today_end' ] = date ( 'Y-m-d' , time ( ) ) . "  23:59:59 " ; $ day_week = intval ( date ( 'N' , time ( ) ) ) ; $ time_first_day_week = ( $ day_week > 1 ) ? time ( ) - ( $ day_week - 1 ) * 86400 : time ( ) ; $ d [ 'week_begin' ] = date ( 'Y-m-d' , $ time_first_day_week ) . "  00:00:00 " ; $ d [ 'week_end' ] = date ( 'Y-m-d' , time ( ) ) . "  23:59:59 " ; $ day_month = intval ( date ( 'j' , time ( ) ) ) ; $ time_first_day_mnth = ( $ day_month > 1 ) ? time ( ) - ( $ day_month - 1 ) * 86400 : time ( ) ; $ d [ 'mnth_begin' ] = date ( 'Y-m-d' , $ time_first_day_mnth ) . "  00:00:00 " ; $ d [ 'mnth_end' ] = date ( 'Y-m-d' , time ( ) ) . "  23:59:59 " ; return $ d ; }
Function returns array of dates for search
 @return array
Function returns array of dates for search @return array
// 1-пн, 2-вт ... 7-вс