日期:2014-05-16  浏览次数:20323 次

extjs中 一种处理封装好了的json时间

1.json传过来的时间参数

"HIREDATE":{"date":17,"day":3,"hours":0,"minutes":0,"month":11,"nanos":0,"seconds":0,"time":345830400000,"timezoneOffset":-480,"year":80},"ENAME":"SMITH"}

extjs得到time(秒计算):

flieds:{name : 'HIREDATE', type : 'date', mapping : 'HIREDATE.time', dateFormat : 'time'}
//格式化时间类型
    function formatDate(value){
         return value ? value.dateFormat('Y-m-d') : ''; 
    }