@@ 5559-5582 (lines=24) @@ | ||
5556 | if ($regs[1] == -1) { |
|
5557 | // �ǽ�������ξ��Υ롼�� |
|
5558 | $monthday_bottom = gmmktime(0, 0, 0, $month, 0, $year); |
|
5559 | while (1) { |
|
5560 | for ($i = 0; $i < $INTERVAL; ++$i) { |
|
5561 | $monthday_bottom += gmdate('t', $monthday_bottom + 86400) * 86400; |
|
5562 | } |
|
5563 | // �ǽ���������Ĵ�٤� |
|
5564 | $last_monthdays_wday = gmdate('w', $monthday_bottom); |
|
5565 | $date_back = $wday - $last_monthdays_wday; |
|
5566 | if ($date_back > 0) { |
|
5567 | $date_back -= 7; |
|
5568 | } |
|
5569 | // �����л��֤ȥ��٥�Ȼ��֤�����ۤʤ���ν����ɲ� |
|
5570 | $gmstart = $monthday_bottom + ($date_back - $tzoffset_date) * 86400 + $secondofday; |
|
5571 | if ($gmstart <= $gmstartbase) { |
|
5572 | continue; |
|
5573 | } |
|
5574 | $gmend = $gmstart + $duration; |
|
5575 | if ($gmstart > $until) { |
|
5576 | break; |
|
5577 | } |
|
5578 | if (++$c > $count) { |
|
5579 | break; |
|
5580 | } |
|
5581 | $sqls[] = $base_sql . ",start=$gmstart ,end=$gmend "; |
|
5582 | } |
|
5583 | } else { |
|
5584 | // ��N������ξ��Υ롼�� |
|
5585 | $monthday_top = gmmktime(0, 0, 0, $month, 1, $year); |
|
@@ 5628-5652 (lines=25) @@ | ||
5625 | if (!count($dates)) { |
|
5626 | return; |
|
5627 | } |
|
5628 | while (1) { |
|
5629 | $months_day = gmdate('t', $monthday_top); |
|
5630 | foreach ($dates as $date) { |
|
5631 | // ��κǽ���ե?�����å� |
|
5632 | if ($date > $months_day) { |
|
5633 | $date = $months_day; |
|
5634 | } |
|
5635 | // �����л��֤ȥ��٥�Ȼ��֤����դ��ۤʤ���ν����ɲ� |
|
5636 | $gmstart = $monthday_top + ($date - 1 - $tzoffset_date) * 86400 + $secondofday; |
|
5637 | if ($gmstart <= $gmstartbase) { |
|
5638 | continue; |
|
5639 | } |
|
5640 | $gmend = $gmstart + $duration; |
|
5641 | if ($gmstart > $until) { |
|
5642 | break 2; |
|
5643 | } |
|
5644 | if (++$c > $count) { |
|
5645 | break 2; |
|
5646 | } |
|
5647 | $sqls[] = $base_sql . ",start=$gmstart ,end=$gmend "; |
|
5648 | } |
|
5649 | for ($i = 0; $i < $INTERVAL; ++$i) { |
|
5650 | $monthday_top += gmdate('t', $monthday_top) * 86400; |
|
5651 | } |
|
5652 | } |
|
5653 | } else { |
|
5654 | // Í���$BYDAY��$BYMONTHDAY��̵����С������֤�����ʤ� |
|
5655 | return; |