-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinclude.php
More file actions
31 lines (29 loc) · 805 Bytes
/
include.php
File metadata and controls
31 lines (29 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?PHP
// Date au format ISO 8601
function sDateISO8601($a_nTimeStamp)
{
$aMatches=array();
// Si PHP5, on utilise date('c');
if(preg_match('/^5/',phpversion()))
return date('c',$a_nTimeStamp);
// Sinon, on le refabrique
else
{
// PHP 3+
$aGetTimeOfDay = gettimeofday();
$sTimeZone = '';
if(preg_match('/^([-+])([^0].*)$/',$aGetTimeOfDay['minuteswest'],$aMatches))
$sTimeZone = ($aMatches[1] == '+' ? '-' : '+').date('H:i',mktime(0,$aMatches[2]));
return date('Y-m-d\TH:i:s',$a_nTimeStamp).$sTimeZone;
}
//return false;
}
// Trie de tableau en retournant le tableau
function arrsort($a_array)
{
if(natcasesort($a_array))
return $a_array;
else
return false;
}
?>