Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Jiju Thomas Mathew

    (@phptrivandrum)

    Hi

    This is been long but a search with the keyword IDNA_DEFAULT pops this up, and it seems that none has resolved it. For anyone to know, some libraries assume the existence of certain extensions, rather than checking and telling about the missing extensions.

    Just install php_intl extension and you should be good to go. If that is geek, then ask the server team to support you with the installation of the same.

    Thread Starter Jiju Thomas Mathew

    (@phptrivandrum)

    Found more bugs in the events-widget.php

    If have only single day events, those will not be displayed on the calendar widget. This is because the range will not satisfy.

    Modified the code in the events-widget.php

    function get_dates($start, $end)
        {
    
            $startDay = strtotime($start);
            $endDay = strtotime($end);
            $days = ($endDay - $startDay) / (60 * 60 * 24);
            $this->eventsData[] = date("m/d/Y", $startDay);
            for ($i = 1; $i <= $days; $i++) {
                $this->eventsData[] = date("m/d/Y", $startDay + ($i * 86400));
            }
    
        }
        /*for php 5.3>*/
            function get_dates_5($start,$end){
    
            $begin = new DateTime( $start );
            $end = new DateTime( $end );
    
            $interval = DateInterval::createFromDateString('1 day');
            $period = new DatePeriod($begin, $interval, $end);
            if(empty($period)){
              $this->eventsData[]= $begin->format( "m/d/Y" );
            }else{
              foreach ( $period as $dt ){
                $this->eventsData[]= $dt->format( "m/d/Y" );
              }
            }
    
        }
Viewing 2 replies - 1 through 2 (of 2 total)