* Re-commit new search UI code, disabled by default. Old form messages still used...
[lhc/web/wiklou.git] / maintenance / language / date-formats.php
1 <?php
2 /**
3 * @file
4 * @ingroup MaintenanceLanguage
5 */
6
7 $ts = '20010115123456';
8
9
10 $IP = dirname( __FILE__ ) . '/../..';
11 require_once( "$IP/maintenance/commandLine.inc" );
12
13 foreach ( glob( "$IP/languages/messages/Messages*.php" ) as $filename ) {
14 $base = basename( $filename );
15 $m = array();
16 if ( !preg_match( '/Messages(.*)\.php$/', $base, $m ) ) {
17 continue;
18 }
19 $code = str_replace( '_', '-', strtolower( $m[1] ) );
20 print "$code ";
21 $lang = Language::factory( $code );
22 $prefs = $lang->getDatePreferences();
23 if ( !$prefs ) {
24 $prefs = array( 'default' );
25 }
26 print "date: ";
27 foreach ( $prefs as $index => $pref ) {
28 if ( $index > 0 ) {
29 print ' | ';
30 }
31 print $lang->date( $ts, false, $pref );
32 }
33 print "\n$code time: ";
34 foreach ( $prefs as $index => $pref ) {
35 if ( $index > 0 ) {
36 print ' | ';
37 }
38 print $lang->time( $ts, false, $pref );
39 }
40 print "\n$code both: ";
41 foreach ( $prefs as $index => $pref ) {
42 if ( $index > 0 ) {
43 print ' | ';
44 }
45 print $lang->timeanddate( $ts, false, $pref );
46 }
47 print "\n\n";
48 }
49
50