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) |
|
| isValidDate ($date) |
|
| 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) |
|
| xml_entity_encode_all ($s) |
|
| cleanhtmljs ($html) |
|
backslash quote and replace double-quote by html entity
Definition at line 499 of file Lib.Util.php.
cal2jd |
( |
|
$era, |
|
|
|
$y, |
|
|
|
$m, |
|
|
|
$d, |
|
|
|
$h, |
|
|
|
$mn, |
|
|
|
$s |
|
) |
| |
Remove JS and other insecure elements from HTML.
- Parameters
-
- Returns
- string
Definition at line 624 of file Lib.Util.php.
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 180 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 84 of file Lib.Util.php.
for FDLGEN directory
- Parameters
-
- Returns
- string
Definition at line 27 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 198 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 316 of file Lib.Util.php.
verify if a date seems valid
- Parameters
-
string | $date | iso, french english date |
- Returns
- bool true if it ia a valid date
Definition at line 228 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 407 of file Lib.Util.php.
return the day of the week (1 id Monday, 7 is Sunday)
- Parameters
-
- Returns
- int
Definition at line 380 of file Lib.Util.php.
return the number of the week in year
- Parameters
-
- Returns
- int between 1 and 53
Definition at line 392 of file Lib.Util.php.
newFreeVaultFile |
( |
|
$dbaccess | ) |
|
sep_replace |
( |
|
$ak, |
|
|
|
$idx, |
|
|
|
$by = "-" , |
|
|
|
$sep = "\n" |
|
) |
| |
replace a string separate by $sep
Definition at line 576 of file Lib.Util.php.
stringDateToIso |
( |
|
$date, |
|
|
|
$format = false , |
|
|
|
$withT = false |
|
) |
| |
convert string date to iso
- Note
- if the $date input is not recognised like a date the function return the original $date argument
- Parameters
-
string | $date | DD/MM/YYYY HH:MM or YYYY-MM-DD HH:MM or YYYY-MM-DDTHH:MM |
| bool|string | optionnal input $format to indicate locale : french default is "%d/%m/%Y %H:%M". If not set use locale configuration of server |
bool | $withT | to add a T between day and hour: YYYY-MM-DDTHH:MM |
- Returns
- string YYYY-MM-DD HH:MM
Definition at line 246 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 217 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 38 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 513 of file Lib.Util.php.
unaccent_iso8859_1 |
( |
|
$string | ) |
|
change & < and > character to respetiv entity
- Parameters
-
- Returns
- string encoded string
Definition at line 596 of file Lib.Util.php.
xml_entity_encode_all |
( |
|
$s | ) |
|