26

datefr

longmonth_fr
SYNOPSIS

longmonth_fr($unixtime)

DESCRIPTION
CODE
  1. function longmonth_fr($unixtime) {
  2.     static $longmonthname=array('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre');
  3.  
  4.     $month = idate('m', $unixtime);
  5.  
  6.     return $longmonthname[$month-1];
  7. }
shortmonth_fr
SYNOPSIS

shortmonth_fr($unixtime)

DESCRIPTION
CODE
  1. function shortmonth_fr($unixtime) {
  2.     static $shortmonthname=array('jan', 'fév', 'mar', 'avr', 'mai', 'jun', 'jul', 'aoû', 'sep', 'oct', 'nov', 'déc');
  3.  
  4.     $month = idate('m', $unixtime);
  5.  
  6.     return $shortmonthname[$month-1];
  7. }
longday_fr
SYNOPSIS

longday_fr($unixtime)

DESCRIPTION
CODE
  1. function longday_fr($unixtime) {
  2.     static $longdayname=array('dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi');
  3.  
  4.     $weekday = idate('w', $unixtime);
  5.  
  6.     return $longdayname[$weekday];
  7. }
shortday_fr
SYNOPSIS

shortday_fr($unixtime)

DESCRIPTION
CODE
  1. function shortday_fr($unixtime) {
  2.     static $shortdayname=array('dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam');
  3.  
  4.     $weekday = idate('w', $unixtime);
  5.  
  6.     return $shortdayname[$weekday];
  7. }
longdate_fr
SYNOPSIS

longdate_fr($unixtime)

DESCRIPTION
CODE
  1. function longdate_fr($unixtime) {
  2.     $day = date('j', $unixtime);
  3.     $year = date('Y', $unixtime);
  4.  
  5.     $month = longmonth_fr($unixtime);
  6.  
  7.     return "$day $month $year";
  8. }
shortdate_fr
SYNOPSIS

shortdate_fr($unixtime)

DESCRIPTION
CODE
  1. function shortdate_fr($unixtime) {
  2.     $day = date('j', $unixtime);
  3.     $year = date('Y', $unixtime);
  4.  
  5.     $month = shortmonth_fr($unixtime);
  6.  
  7.     return "$day-$month-$year";
  8. }
shortdatetime_fr
SYNOPSIS

shortdatetime_fr($unixtime)

DESCRIPTION
CODE
  1. function shortdatetime_fr($unixtime) {
  2.     $date = shortdate_fr($unixtime);
  3.  
  4.     $hour = date('H', $unixtime);
  5.     $minute = date('i', $unixtime);
  6.  
  7.     return "$date ${hour}h{$minute}";
  8. }
longdatetime_fr
SYNOPSIS

longdatetime_fr($unixtime)

DESCRIPTION
CODE
  1. function longdatetime_fr($unixtime) {
  2.     $date = longdate_fr($unixtime);
  3.  
  4.     $hour = date('H', $unixtime);
  5.     $minute = date('i', $unixtime);
  6.  
  7.     return "$date ${hour}h{$minute}";
  8. }
longtime_fr
SYNOPSIS

longtime_fr($unixtime)

DESCRIPTION
CODE
  1. function longtime_fr($d) {
  2.     if ($d < 60*60) {
  3.         return sprintf('%dm %ds', $d / 60, $d % 60);
  4.     }
  5.     else if ($d < 24*60*60) {
  6.         return sprintf('%dh %dm %ds', $d / 3600, ($d % 3600) / 60, $d % 60);
  7.     }
  8.     else {
  9.         return sprintf('%dj %dh %dm %ds', $d / 86400, ($d % 86400) / 3600, ($d % 3600) / 60, $d % 60);
  10.     }
  11. }
SEE ALSO

dateen, datedifffr

Comments

Your comment:
[p] [b] [i] [u] [s] [quote] [pre] [br] [code] [url] [email] strip help 2000

Enter a maximum of 2000 characters.
Improve the presentation of your text with the following formatting tags:
[p]paragraph[/p], [b]bold[/b], [i]italics[/i], [u]underline[/u], [s]strike[/s], [quote]citation[/quote], [pre]as is[/pre], [br]line break,
[url]http://www.izend.org[/url], [url=http://www.izend.org]site[/url], [email]izend@izend.org[/email], [email=izend@izend.org]izend[/email],
[code]command[/code], [code=language]source code in c, java, php, html, javascript, xml, css, sql, bash, dos, make, etc.[/code].