ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
sspmod_statistics_DateHandlerMonth Class Reference
+ Inheritance diagram for sspmod_statistics_DateHandlerMonth:
+ Collaboration diagram for sspmod_statistics_DateHandlerMonth:

Public Member Functions

 __construct ($offset)
 Constructor. More...
 
 toSlot ($epoch, $slotsize)
 
 fromSlot ($slot, $slotsize)
 
 prettyHeader ($from, $to, $slotsize, $dateformat)
 
- Public Member Functions inherited from sspmod_statistics_DateHandler
 __construct ($offset)
 Constructor. More...
 
 toSlot ($epoch, $slotsize)
 
 fromSlot ($slot, $slotsize)
 
 prettyDateEpoch ($epoch, $dateformat)
 
 prettyDateSlot ($slot, $slotsize, $dateformat)
 
 prettyHeader ($from, $to, $slotsize, $dateformat)
 

Additional Inherited Members

- Protected Member Functions inherited from sspmod_statistics_DateHandler
 getDST ($timestamp)
 
- Protected Attributes inherited from sspmod_statistics_DateHandler
 $offset
 

Detailed Description

Definition at line 6 of file DateHandlerMonth.php.

Constructor & Destructor Documentation

◆ __construct()

sspmod_statistics_DateHandlerMonth::__construct (   $offset)

Constructor.

Parameters
array$offsetDate offset

Reimplemented from sspmod_statistics_DateHandler.

Definition at line 13 of file DateHandlerMonth.php.

14 {
15 $this->offset = $offset;
16 }

References sspmod_statistics_DateHandler\$offset.

Member Function Documentation

◆ fromSlot()

sspmod_statistics_DateHandlerMonth::fromSlot (   $slot,
  $slotsize 
)

Reimplemented from sspmod_statistics_DateHandler.

Definition at line 26 of file DateHandlerMonth.php.

27 {
28 $month = ($slot % 12);
29 $year = 2000 + floor($slot / 12);
30 return mktime(0, 0, 0, $month + 1, 1, $year);
31 }

◆ prettyHeader()

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

Reimplemented from sspmod_statistics_DateHandler.

Definition at line 33 of file DateHandlerMonth.php.

34 {
35 $month = ($from % 12) + 1;
36 $year = 2000 + floor($from / 12);
37 return $year . '-' . $month;
38 }
$from

References $from.

◆ toSlot()

sspmod_statistics_DateHandlerMonth::toSlot (   $epoch,
  $slotsize 
)

Reimplemented from sspmod_statistics_DateHandler.

Definition at line 18 of file DateHandlerMonth.php.

19 {
20 $dsttime = $this->getDST($epoch) + $epoch;
21 $parsed = getdate($dsttime);
22 $slot = (($parsed['year'] - 2000) * 12) + $parsed['mon'] - 1;
23 return $slot;
24 }

References sspmod_statistics_DateHandler\getDST().

+ Here is the call graph for this function:

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