ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
sspmod_statistics_DateHandler Class Reference
+ Inheritance diagram for sspmod_statistics_DateHandler:
+ Collaboration diagram for sspmod_statistics_DateHandler:

Public Member Functions

 __construct ($offset)
 Constructor. More...
 
 toSlot ($epoch, $slotsize)
 
 fromSlot ($slot, $slotsize)
 
 prettyDateEpoch ($epoch, $dateformat)
 
 prettyDateSlot ($slot, $slotsize, $dateformat)
 
 prettyHeader ($from, $to, $slotsize, $dateformat)
 

Protected Member Functions

 getDST ($timestamp)
 

Protected Attributes

 $offset
 

Detailed Description

Definition at line 6 of file DateHandler.php.

Constructor & Destructor Documentation

◆ __construct()

sspmod_statistics_DateHandler::__construct (   $offset)

Constructor.

Parameters
array$offsetDate offset

Reimplemented in sspmod_statistics_DateHandlerMonth.

Definition at line 15 of file DateHandler.php.

16 {
17 $this->offset = $offset;
18 }

References $offset.

Member Function Documentation

◆ fromSlot()

sspmod_statistics_DateHandler::fromSlot (   $slot,
  $slotsize 
)

Reimplemented in sspmod_statistics_DateHandlerMonth.

Definition at line 34 of file DateHandler.php.

35 {
36 $temp = $slot*$slotsize - $this->offset;
37 $dst = $this->getDST($temp);
38 return $slot*$slotsize - $this->offset - $dst;
39 }
$dst

References $dst, $offset, and getDST().

Referenced by prettyDateSlot().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDST()

sspmod_statistics_DateHandler::getDST (   $timestamp)
protected

Definition at line 20 of file DateHandler.php.

21 {
22 if (idate('I', $timestamp)) {
23 return 3600;
24 }
25 return 0;
26 }
foreach($mandatory_scripts as $file) $timestamp
Definition: buildRTE.php:81

References $timestamp.

Referenced by fromSlot(), toSlot(), and sspmod_statistics_DateHandlerMonth\toSlot().

+ Here is the caller graph for this function:

◆ prettyDateEpoch()

sspmod_statistics_DateHandler::prettyDateEpoch (   $epoch,
  $dateformat 
)

Definition at line 41 of file DateHandler.php.

42 {
43 return date($dateformat, $epoch);
44 }

Referenced by prettyDateSlot().

+ Here is the caller graph for this function:

◆ prettyDateSlot()

sspmod_statistics_DateHandler::prettyDateSlot (   $slot,
  $slotsize,
  $dateformat 
)

Definition at line 46 of file DateHandler.php.

47 {
48 return $this->prettyDateEpoch($this->fromSlot($slot, $slotsize), $dateformat);
49 }
prettyDateEpoch($epoch, $dateformat)
Definition: DateHandler.php:41
fromSlot($slot, $slotsize)
Definition: DateHandler.php:34

References fromSlot(), and prettyDateEpoch().

Referenced by prettyHeader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prettyHeader()

sspmod_statistics_DateHandler::prettyHeader (   $from,
  $to,
  $slotsize,
  $dateformat 
)

Reimplemented in sspmod_statistics_DateHandlerMonth.

Definition at line 51 of file DateHandler.php.

52 {
53 $text = $this->prettyDateSlot($from, $slotsize, $dateformat);
54 $text .= ' to ';
55 $text .= $this->prettyDateSlot($to, $slotsize, $dateformat);
56 return $text;
57 }
prettyDateSlot($slot, $slotsize, $dateformat)
Definition: DateHandler.php:46
$from
$text
Definition: errorreport.php:18

References $from, $text, and prettyDateSlot().

+ Here is the call graph for this function:

◆ toSlot()

sspmod_statistics_DateHandler::toSlot (   $epoch,
  $slotsize 
)

Reimplemented in sspmod_statistics_DateHandlerMonth.

Definition at line 28 of file DateHandler.php.

29 {
30 $dst = $this->getDST($epoch);
31 return floor( ($epoch + $this->offset + $dst) / $slotsize);
32 }

References $dst, and getDST().

+ Here is the call graph for this function:

Field Documentation

◆ $offset

sspmod_statistics_DateHandler::$offset
protected

The documentation for this class was generated from the following file: