26
datefr
longmonth_fr
SYNOPSIS
longmonth_fr($unixtime)
DESCRIPTION
CODE
- function longmonth_fr($unixtime) {
- static $longmonthname=array('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre');
- $month = idate('m', $unixtime);
- return $longmonthname[$month-1];
- }
shortmonth_fr
SYNOPSIS
shortmonth_fr($unixtime)
DESCRIPTION
CODE
- function shortmonth_fr($unixtime) {
- static $shortmonthname=array('jan', 'fév', 'mar', 'avr', 'mai', 'jun', 'jul', 'aoû', 'sep', 'oct', 'nov', 'déc');
- $month = idate('m', $unixtime);
- return $shortmonthname[$month-1];
- }
longday_fr
SYNOPSIS
longday_fr($unixtime)
DESCRIPTION
CODE
- function longday_fr($unixtime) {
- static $longdayname=array('dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi');
- $weekday = idate('w', $unixtime);
- return $longdayname[$weekday];
- }
shortday_fr
SYNOPSIS
shortday_fr($unixtime)
DESCRIPTION
CODE
- function shortday_fr($unixtime) {
- static $shortdayname=array('dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam');
- $weekday = idate('w', $unixtime);
- return $shortdayname[$weekday];
- }
longdate_fr
SYNOPSIS
longdate_fr($unixtime)
DESCRIPTION
CODE
- function longdate_fr($unixtime) {
- $day = date('j', $unixtime);
- $year = date('Y', $unixtime);
- $month = longmonth_fr($unixtime);
- return "$day $month $year";
- }
shortdate_fr
SYNOPSIS
shortdate_fr($unixtime)
DESCRIPTION
CODE
- function shortdate_fr($unixtime) {
- $day = date('j', $unixtime);
- $year = date('Y', $unixtime);
- $month = shortmonth_fr($unixtime);
- return "$day-$month-$year";
- }
shortdatetime_fr
SYNOPSIS
shortdatetime_fr($unixtime)
DESCRIPTION
CODE
- function shortdatetime_fr($unixtime) {
- $date = shortdate_fr($unixtime);
- $hour = date('H', $unixtime);
- $minute = date('i', $unixtime);
- return "$date ${hour}h{$minute}";
- }
longdatetime_fr
SYNOPSIS
longdatetime_fr($unixtime)
DESCRIPTION
CODE
- function longdatetime_fr($unixtime) {
- $date = longdate_fr($unixtime);
- $hour = date('H', $unixtime);
- $minute = date('i', $unixtime);
- return "$date ${hour}h{$minute}";
- }
longtime_fr
SYNOPSIS
longtime_fr($unixtime)
DESCRIPTION
CODE
- function longtime_fr($d) {
- if ($d < 60*60) {
- return sprintf('%dm %ds', $d / 60, $d % 60);
- }
- else if ($d < 24*60*60) {
- return sprintf('%dh %dm %ds', $d / 3600, ($d % 3600) / 60, $d % 60);
- }
- else {
- return sprintf('%dj %dh %dm %ds', $d / 86400, ($d % 86400) / 3600, ($d % 3600) / 60, $d % 60);
- }
- }
Comments