Add a new renderer for displaying dates in a human readable way
render_timestamp returns a Date as "2017-01-31 16:17:33" which is good for computers and column sorting but unfit for human consumption the new renderer added by this patch renders a Date as "Tuesday 31 January 2017 16:18:08" Day-month-year order is the most used ordering in the world and also commonly used in the USA for official documents. source: https://en.wikipedia.org/wiki/Date_and_time_notation_in_the_United_States https://en.wikipedia.org/wiki/Date_format_by_country
This commit is contained in:
parent
b0f820ab9f
commit
3f6336553c
@ -913,6 +913,10 @@ Ext.define('PVE.Utils', { utilities: {
|
||||
return Ext.Date.format(servertime, 'Y-m-d H:i:s');
|
||||
},
|
||||
|
||||
render_timestamp_human_readable: function(value) {
|
||||
return Ext.Date.format(new Date(value * 1000), 'l d F Y H:i:s');
|
||||
},
|
||||
|
||||
calculate_mem_usage: function(data) {
|
||||
if (!Ext.isNumeric(data.mem) ||
|
||||
data.maxmem === 0 ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user