ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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
integer$offsetDate offset

Definition at line 13 of file DateHandlerMonth.php.

References sspmod_statistics_DateHandler\$offset.

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

Member Function Documentation

◆ fromSlot()

sspmod_statistics_DateHandlerMonth::fromSlot (   $slot,
  $slotsize 
)

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 
)

Definition at line 33 of file DateHandlerMonth.php.

References $from.

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

◆ toSlot()

sspmod_statistics_DateHandlerMonth::toSlot (   $epoch,
  $slotsize 
)

Definition at line 18 of file DateHandlerMonth.php.

References sspmod_statistics_DateHandler\getDST().

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

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