mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
print dates in shorter format so columns don't wrap as frequently
This commit is contained in:
parent
72e114838f
commit
840385b3ad
1 changed files with 8 additions and 2 deletions
|
@ -84,6 +84,12 @@ function strip_quotes($str) {
|
||||||
return trim( $str, '"');
|
return trim( $str, '"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function print_date( $str ) {
|
||||||
|
$str = strip_quotes( $str );
|
||||||
|
$time = strtotime( $str );
|
||||||
|
return strftime( "%x@%R", $time );
|
||||||
|
}
|
||||||
|
|
||||||
$cols = array( new Column("dead", "D", "capitalize", false ),
|
$cols = array( new Column("dead", "D", "capitalize", false ),
|
||||||
new Column("pub", "P", "capitalize", false ),
|
new Column("pub", "P", "capitalize", false ),
|
||||||
new Column("room", "Room", "identity", false ),
|
new Column("room", "Room", "identity", false ),
|
||||||
|
@ -94,8 +100,8 @@ $cols = array( new Column("dead", "D", "capitalize", false ),
|
||||||
new Column("ack", "A", "identity", true ),
|
new Column("ack", "A", "identity", true ),
|
||||||
new Column("nsent", "Sent", "identity", false ),
|
new Column("nsent", "Sent", "identity", false ),
|
||||||
new Column("addrs", "Dev. addr", "ip_to_host", true ),
|
new Column("addrs", "Dev. addr", "ip_to_host", true ),
|
||||||
new Column("ctime", "Created", "strip_quotes", false ),
|
new Column("ctime", "Created", "print_date", false ),
|
||||||
new Column("mtimes", "Last contact", "strip_quotes", true ),
|
new Column("mtimes", "Last contact", "print_date", true ),
|
||||||
);
|
);
|
||||||
|
|
||||||
$colnames = array();
|
$colnames = array();
|
||||||
|
|
Loading…
Reference in a new issue