[ create a new paste ] login | about

Link: http://codepad.org/TM5pMFV2    [ raw code | output | fork ]

PHP, pasted on Oct 22:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php

$strtime = strtotime('Wednesday 12am');

for ($i = 0; $i <= 168; $i++) {
    $next = strtime + ($i * 60 * 60);
    $wH = date('wH', $next);
    $out = date('wH', $next)." (" . date('D h a', $next) . ")";

    if (($wH > 516 && $wH < 525) || ($wH >= 600 && $wH < 622)) {
        echo "  $out - Script exited.\n";
    } else {
        echo "$out - Script ran.\n";
    }
}

?>


Output:
400 (Thu 12 am) - Script ran.
401 (Thu 01 am) - Script ran.
402 (Thu 02 am) - Script ran.
403 (Thu 03 am) - Script ran.
404 (Thu 04 am) - Script ran.
405 (Thu 05 am) - Script ran.
406 (Thu 06 am) - Script ran.
407 (Thu 07 am) - Script ran.
408 (Thu 08 am) - Script ran.
409 (Thu 09 am) - Script ran.
410 (Thu 10 am) - Script ran.
411 (Thu 11 am) - Script ran.
412 (Thu 12 pm) - Script ran.
413 (Thu 01 pm) - Script ran.
414 (Thu 02 pm) - Script ran.
415 (Thu 03 pm) - Script ran.
416 (Thu 04 pm) - Script ran.
417 (Thu 05 pm) - Script ran.
418 (Thu 06 pm) - Script ran.
419 (Thu 07 pm) - Script ran.
420 (Thu 08 pm) - Script ran.
421 (Thu 09 pm) - Script ran.
422 (Thu 10 pm) - Script ran.
423 (Thu 11 pm) - Script ran.
500 (Fri 12 am) - Script ran.
501 (Fri 01 am) - Script ran.
502 (Fri 02 am) - Script ran.
503 (Fri 03 am) - Script ran.
504 (Fri 04 am) - Script ran.
505 (Fri 05 am) - Script ran.
506 (Fri 06 am) - Script ran.
507 (Fri 07 am) - Script ran.
508 (Fri 08 am) - Script ran.
509 (Fri 09 am) - Script ran.
510 (Fri 10 am) - Script ran.
511 (Fri 11 am) - Script ran.
512 (Fri 12 pm) - Script ran.
513 (Fri 01 pm) - Script ran.
514 (Fri 02 pm) - Script ran.
515 (Fri 03 pm) - Script ran.
516 (Fri 04 pm) - Script ran.
  517 (Fri 05 pm) - Script exited.
  518 (Fri 06 pm) - Script exited.
  519 (Fri 07 pm) - Script exited.
  520 (Fri 08 pm) - Script exited.
  521 (Fri 09 pm) - Script exited.
  522 (Fri 10 pm) - Script exited.
  523 (Fri 11 pm) - Script exited.
  600 (Sat 12 am) - Script exited.
  601 (Sat 01 am) - Script exited.
  602 (Sat 02 am) - Script exited.
  603 (Sat 03 am) - Script exited.
  604 (Sat 04 am) - Script exited.
  605 (Sat 05 am) - Script exited.
  606 (Sat 06 am) - Script exited.
  607 (Sat 07 am) - Script exited.
  608 (Sat 08 am) - Script exited.
  609 (Sat 09 am) - Script exited.
  610 (Sat 10 am) - Script exited.
  611 (Sat 11 am) - Script exited.
  612 (Sat 12 pm) - Script exited.
  613 (Sat 01 pm) - Script exited.
  614 (Sat 02 pm) - Script exited.
  615 (Sat 03 pm) - Script exited.
  616 (Sat 04 pm) - Script exited.
  617 (Sat 05 pm) - Script exited.
  618 (Sat 06 pm) - Script exited.
  619 (Sat 07 pm) - Script exited.
  620 (Sat 08 pm) - Script exited.
  621 (Sat 09 pm) - Script exited.
622 (Sat 10 pm) - Script ran.
623 (Sat 11 pm) - Script ran.
000 (Sun 12 am) - Script ran.
001 (Sun 01 am) - Script ran.
002 (Sun 02 am) - Script ran.
003 (Sun 03 am) - Script ran.
004 (Sun 04 am) - Script ran.
005 (Sun 05 am) - Script ran.
006 (Sun 06 am) - Script ran.
007 (Sun 07 am) - Script ran.
008 (Sun 08 am) - Script ran.
009 (Sun 09 am) - Script ran.
010 (Sun 10 am) - Script ran.
011 (Sun 11 am) - Script ran.
012 (Sun 12 pm) - Script ran.
013 (Sun 01 pm) - Script ran.
014 (Sun 02 pm) - Script ran.
015 (Sun 03 pm) - Script ran.
016 (Sun 04 pm) - Script ran.
017 (Sun 05 pm) - Script ran.
018 (Sun 06 pm) - Script ran.
019 (Sun 07 pm) - Script ran.
020 (Sun 08 pm) - Script ran.
021 (Sun 09 pm) - Script ran.
022 (Sun 10 pm) - Script ran.
023 (Sun 11 pm) - Script ran.
100 (Mon 12 am) - Script ran.
101 (Mon 01 am) - Script ran.
102 (Mon 02 am) - Script ran.
103 (Mon 03 am) - Script ran.
104 (Mon 04 am) - Script ran.
105 (Mon 05 am) - Script ran.
106 (Mon 06 am) - Script ran.
107 (Mon 07 am) - Script ran.
108 (Mon 08 am) - Script ran.
109 (Mon 09 am) - Script ran.
110 (Mon 10 am) - Script ran.
111 (Mon 11 am) - Script ran.
112 (Mon 12 pm) - Script ran.
113 (Mon 01 pm) - Script ran.
114 (Mon 02 pm) - Script ran.
115 (Mon 03 pm) - Script ran.
116 (Mon 04 pm) - Script ran.
117 (Mon 05 pm) - Script ran.
118 (Mon 06 pm) - Script ran.
119 (Mon 07 pm) - Script ran.
120 (Mon 08 pm) - Script ran.
121 (Mon 09 pm) - Script ran.
122 (Mon 10 pm) - Script ran.
123 (Mon 11 pm) - Script ran.
200 (Tue 12 am) - Script ran.
201 (Tue 01 am) - Script ran.
202 (Tue 02 am) - Script ran.
203 (Tue 03 am) - Script ran.
204 (Tue 04 am) - Script ran.
205 (Tue 05 am) - Script ran.
206 (Tue 06 am) - Script ran.
207 (Tue 07 am) - Script ran.
208 (Tue 08 am) - Script ran.
209 (Tue 09 am) - Script ran.
210 (Tue 10 am) - Script ran.
211 (Tue 11 am) - Script ran.
212 (Tue 12 pm) - Script ran.
213 (Tue 01 pm) - Script ran.
214 (Tue 02 pm) - Script ran.
215 (Tue 03 pm) - Script ran.
216 (Tue 04 pm) - Script ran.
217 (Tue 05 pm) - Script ran.
218 (Tue 06 pm) - Script ran.
219 (Tue 07 pm) - Script ran.
220 (Tue 08 pm) - Script ran.
221 (Tue 09 pm) - Script ran.
222 (Tue 10 pm) - Script ran.
223 (Tue 11 pm) - Script ran.
300 (Wed 12 am) - Script ran.
301 (Wed 01 am) - Script ran.
302 (Wed 02 am) - Script ran.
303 (Wed 03 am) - Script ran.
304 (Wed 04 am) - Script ran.
305 (Wed 05 am) - Script ran.
306 (Wed 06 am) - Script ran.
307 (Wed 07 am) - Script ran.
308 (Wed 08 am) - Script ran.
309 (Wed 09 am) - Script ran.
310 (Wed 10 am) - Script ran.
311 (Wed 11 am) - Script ran.
312 (Wed 12 pm) - Script ran.
313 (Wed 01 pm) - Script ran.
314 (Wed 02 pm) - Script ran.
315 (Wed 03 pm) - Script ran.
316 (Wed 04 pm) - Script ran.
317 (Wed 05 pm) - Script ran.
318 (Wed 06 pm) - Script ran.
319 (Wed 07 pm) - Script ran.
320 (Wed 08 pm) - Script ran.
321 (Wed 09 pm) - Script ran.
322 (Wed 10 pm) - Script ran.
323 (Wed 11 pm) - Script ran.
400 (Thu 12 am) - Script ran.


Create a new paste based on this one


Comments: