Programming/JavaScript, Sencha
Sencha dateformat
파란크리스마스
2012. 7. 3. 01:35
728x90
출처 :
http://stackoverflow.com/questions/10496912/convert-date-from-json-format-to-other-formats-in-sencha
http://stackoverflow.com/questions/7848369/sencha-touch-date-format
소스
Ext.regModel('dataModel', { fields: [ {name: 'id', type: 'int'}, {name: 'vod_id', type: 'int'}, {name: 'comment', type: 'string'}, {name: 'regid', type: 'string'}, {name: 'regdate', type:'date', dateFormat: 'c'} ] }); dataList = new Ext.List({ title: 'VodComment목록', store: dataStore, scroll: false, layout:'fit', blockRefresh:true, itemTpl:'{comment} {regid} / {regdate:date("Y.m.d H:i:s")}' });
패턴
Date.patterns = { ISO8601Long : "Y-m-d H:i:s", ISO8601Short : "Y-m-d", ShortDate : "n/j/Y", LongDate : "l, F d, Y", FullDateTime : "l, F d, Y g:i:s A", MonthDay : "F d", ShortTime : "g:i A", LongTime : "g:i:s A", SortableDateTime : "Y-m-d\\TH:i:s", UniversalSortableDateTime : "Y-m-d H:i:sO", YearMonth : "F, Y" };