45 public function date( $ts, $adj =
false, $format =
true, $tc =
false ) {
50 $datePreference = $this->
dateFormat( $format );
52 # ISO (YYYY-mm-dd) format
53 # we also output this format for YMD (eg: 2001 January 15)
54 if ( $datePreference ==
'ISO 8601' ) {
55 $d = substr( $ts, 0, 4 ) .
'-' . substr( $ts, 4, 2 ) .
'-' . substr( $ts, 6, 2 );
60 if ( $datePreference ==
'walloon short' ) {
61 $d = substr( $ts, 6, 2 ) .
'/' . substr( $ts, 4, 2 ) .
'/' . substr( $ts, 0, 4 );
66 # we output this in all other cases
67 $m = substr( $ts, 4, 2 );
68 $n = substr( $ts, 6, 2 );
71 " " . substr( $ts, 0, 4 );
72 } elseif ( $n == 2 || $n == 3 || $n == 20 || $n == 22 || $n == 23 ) {
74 " " . substr( $ts, 0, 4 );
75 } elseif ( $m == 4 || $m == 8 || $m == 10 ) {
77 " " . substr( $ts, 0, 4 );
80 " " . substr( $ts, 0, 4 );
92 public function timeanddate( $ts, $adj =
false, $format =
true, $tc =
false ) {
96 $datePreference = $this->
dateFormat( $format );
97 if ( $datePreference ==
'ISO 8601' ) {
98 return parent::timeanddate( $ts, $adj, $format, $tc );
100 return $this->
date( $ts, $adj, $format, $tc ) .
' a ' .
101 $this->
time( $ts, $adj, $format, $tc );