ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
DateHandlerMonth.php
Go to the documentation of this file.
1
<?php
2
/*
3
* @author Andreas Åkre Solberg <andreas.solberg@uninett.no>
4
* @package SimpleSAMLphp
5
*/
6
class
sspmod_statistics_DateHandlerMonth
extends
sspmod_statistics_DateHandler
7
{
13
public
function
__construct
(
$offset
)
14
{
15
$this->offset =
$offset
;
16
}
17
18
public
function
toSlot
($epoch, $slotsize)
19
{
20
$dsttime = $this->
getDST
($epoch) + $epoch;
21
$parsed = getdate($dsttime);
22
$slot = (($parsed[
'year'
] - 2000) * 12) + $parsed[
'mon'
] - 1;
23
return
$slot;
24
}
25
26
public
function
fromSlot
($slot, $slotsize)
27
{
28
$month = ($slot % 12);
29
$year = 2000 + floor($slot / 12);
30
return
mktime(0, 0, 0, $month + 1, 1, $year);
31
}
32
33
public
function
prettyHeader
(
$from
, $to, $slotsize, $dateformat)
34
{
35
$month = (
$from
% 12) + 1;
36
$year = 2000 + floor(
$from
/ 12);
37
return
$year .
'-'
. $month;
38
}
39
}
sspmod_statistics_DateHandlerMonth\prettyHeader
prettyHeader($from, $to, $slotsize, $dateformat)
Definition:
DateHandlerMonth.php:33
$from
$from
Definition:
logout-iframe.php:5
sspmod_statistics_DateHandlerMonth\__construct
__construct($offset)
Constructor.
Definition:
DateHandlerMonth.php:13
sspmod_statistics_DateHandler\$offset
$offset
Definition:
DateHandler.php:8
sspmod_statistics_DateHandler
Definition:
DateHandler.php:6
sspmod_statistics_DateHandlerMonth\fromSlot
fromSlot($slot, $slotsize)
Definition:
DateHandlerMonth.php:26
sspmod_statistics_DateHandlerMonth\toSlot
toSlot($epoch, $slotsize)
Definition:
DateHandlerMonth.php:18
sspmod_statistics_DateHandlerMonth
Definition:
DateHandlerMonth.php:6
sspmod_statistics_DateHandler\getDST
getDST($timestamp)
Definition:
DateHandler.php:20
libs
composer
vendor
simplesamlphp
simplesamlphp
modules
statistics
lib
DateHandlerMonth.php
Generated on Sat Jan 18 2025 19:01:11 for ILIAS by
1.8.13 (using
Doxyfile
)