Go to the source code of this file.
|
| newFreeVaultFile ($dbaccess) |
|
| getGen ($dbaccess) |
|
| toIso8601 ($fdate, $wtz=false) |
|
| stringDateToJD ($sdate) |
|
| frenchDateToJD ($fdate) |
|
| frenchDateToUnixTs ($fdate, $utc=false) |
|
| stringDateToLocaleDate ($fdate, $format= '') |
|
| frenchDateToLocaleDate ($fdate, $format= '') |
|
| frenchDateToIso ($fdate, $withT=true) |
|
| iso8601DateToUnixTs ($isodate, $utc=false) |
|
| stringDateToUnixTs ($isodate, $utc=false) |
|
| stringDateToIso ($date, $format=false, $withT=false) |
|
| iso8601ToJD ($isodate) |
|
| cal2jd ($era, $y, $m, $d, $h, $mn, $s) |
|
| jdWeekDay ($jd) |
|
| jdWeekNumber ($jd) |
|
| jd2cal ($jd, $dformat= '') |
|
| addJsSlashes ($s) |
|
| unaccent_ ($text) |
|
| unaccent_iso8859_1 ($string) |
|
| unaccent_utf8 ($string) |
|
| unaccent ($s) |
|
| sep_replace ($ak, $idx, $by="-", $sep="\n") |
|
| xml_entity_encode ($s) |
|
backslash quote and replace double-quote by html entity
Definition at line 475 of file Lib.Util.php.
cal2jd |
( |
|
$era, |
|
|
|
$y, |
|
|
|
$m, |
|
|
|
$d, |
|
|
|
$h, |
|
|
|
$mn, |
|
|
|
$s |
|
) |
| |
frenchDateToIso |
( |
|
$fdate, |
|
|
|
$withT = true |
|
) |
| |
convert French date DD/MM/YYYY to iso date must be > 01/01/1970 and < 2038
- Parameters
-
string | $fdate | DD/MM/YYYY HH:MM |
boolean | $withT | return YYYY-MM-DDTHH:MM:SS else YYYY-MM-DD HH:MM:SS |
- Returns
- string YYYY-MM-DD HH:MM:SS
Definition at line 175 of file Lib.Util.php.
convert French date to Julian day the seconds are ignored
- Parameters
-
string | $fdate | DD/MM/YYYY HH:MM |
- Returns
- float julian day (return false if incorrect date)
Definition at line 65 of file Lib.Util.php.
frenchDateToLocaleDate |
( |
|
$fdate, |
|
|
|
$format = '' |
|
) |
| |
frenchDateToUnixTs |
( |
|
$fdate, |
|
|
|
$utc = false |
|
) |
| |
convert French date to unix timestamp date must be > 01/01/1970 and < 2038
- Parameters
-
string | $fdate | DD/MM/YYYY HH:MM |
- Returns
- float number of second since epoch (return -1 if incorrect date)
Definition at line 78 of file Lib.Util.php.
iso8601DateToUnixTs |
( |
|
$isodate, |
|
|
|
$utc = false |
|
) |
| |
convert iso date to unix timestamp date must be > 1970-01-01 and < 2038
- Parameters
-
string | $isodate | YYYY-MM-DD HH:MM |
- Returns
- float number of second since epoch (return -1 if incorrect date)
Definition at line 193 of file Lib.Util.php.
convert iso8601 date to Julian day the seconds are ignored
- Parameters
-
string | $isodate | YYYY-MM-DD HH:MM |
- Returns
- float julian day (return false if incorrect date)
Definition at line 293 of file Lib.Util.php.
jd2cal |
( |
|
$jd, |
|
|
|
$dformat = '' |
|
) |
| |
return date in string format
- Parameters
-
float | $jd | julian date |
string | $dformat | the format (default iso8601) |
- Returns
- string the formatted date
Definition at line 383 of file Lib.Util.php.
return the day of the week (1 id Monday, 7 is Sunday)
- Parameters
-
- Returns
- int
Definition at line 356 of file Lib.Util.php.
return the number of the week in year
- Parameters
-
- Returns
- int between 1 and 53
Definition at line 368 of file Lib.Util.php.
newFreeVaultFile |
( |
|
$dbaccess | ) |
|
sep_replace |
( |
|
$ak, |
|
|
|
$idx, |
|
|
|
$by = "-" , |
|
|
|
$sep = "\n" |
|
) |
| |
replace a string separate by $sep
Definition at line 551 of file Lib.Util.php.
stringDateToIso |
( |
|
$date, |
|
|
|
$format = false , |
|
|
|
$withT = false |
|
) |
| |
convert string date to iso
- Parameters
-
string | $date | DD/MM/YYYY HH:MM* |
string | $format | to indicate locale |
bool | $withT | to add a T : YYYY-MM-DDTHH:MM |
- Returns
- string YYYY-MM-DD HH:MM
Definition at line 223 of file Lib.Util.php.
stringDateToLocaleDate |
( |
|
$fdate, |
|
|
|
$format = '' |
|
) |
| |
stringDateToUnixTs |
( |
|
$isodate, |
|
|
|
$utc = false |
|
) |
| |
convert date to unix timestamp date must be > 1970-01-01 and < 2038
- Parameters
-
string | $isodate | YYYY-MM-DD HH:MM |
- Returns
- float number of second since epoch (return -1 if incorrect date)
Definition at line 209 of file Lib.Util.php.
toIso8601 |
( |
|
$fdate, |
|
|
|
$wtz = false |
|
) |
| |
convert French date to iso8601
- Parameters
-
string | $fdate | DD/MM/YYYY HH:MM:SS (CET) |
string | $wtz | with timezone add time zone in the end if true |
- Returns
- string date YYYY-MM-DD HH:MM:SS
- Deprecated:
- use stringDateToIso() instead
Definition at line 39 of file Lib.Util.php.
Remove Character Accents Replaces accented characters in a string with their unaccented versions, for instance, converts "ÉéÜüÄäÖ" into "EeUuAaO". The function will handle any accented character for which there exists an HTML entity in PHP's translation table (i.e. pretty much any and all characters). Credits go to jennings at trad dot uji dot es for the original version of this incredibly useful little function. I used this function to good effect in OpenSEF.
Definition at line 489 of file Lib.Util.php.
unaccent_iso8859_1 |
( |
|
$string | ) |
|
change & < and > character to respetiv entity
- Parameters
-
- Returns
- string encoded string
Definition at line 571 of file Lib.Util.php.