This repository was archived by the owner on Mar 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,15 @@ class StatsData {
66 const DATE_PREG = '/^\d{4}-(0|1)\d-[0-3]\d$/ ' ;
77
88 private int $ until = 0 ;
9+ private int $ untilDay = 0 ;
910 private int $ forward = -1 ;
1011 private array $ filelist = array ();
1112 private array $ dataset = array ();
1213
1314 public function __construct (int $ time = 0 , int $ forwardTo = self ::FORWARD_TO_NOW ) {
1415 $ this ->forward = ( $ forwardTo === self ::FORWARD_TO_NOW ) ? time () : $ forwardTo ;
1516 $ this ->until = $ time ;
17+ $ this ->untilDay = strtotime (date ('Y-m-d ' , $ this ->until )); // timestamp 00:00 for day of $until
1618 $ this ->selectUntil ();
1719 }
1820
@@ -23,7 +25,7 @@ private function selectUntil() : void {
2325 foreach ( $ datafiles as $ f ){
2426 $ timestamp = strtotime (substr ($ f , 0 , -5 ));
2527 if ( $ timestamp !== false ){
26- if ( $ timestamp >= $ this ->until && $ timestamp <= $ this ->forward ){
28+ if ( $ timestamp >= $ this ->untilDay && $ timestamp <= $ this ->forward ){
2729 $ this ->filelist [] = substr ($ f , 0 , -5 );
2830 }
2931 }
Original file line number Diff line number Diff line change 44 */
55class Utilities {
66
7- const VERSION = 'v0.9.1 beta ' ;
7+ const VERSION = 'v0.9.2 beta ' ;
88
99 /**
1010 * OS Consts
You can’t perform that action at this time.
0 commit comments