lpmp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +3 -0
- data/README +3 -0
- data/Rakefile +45 -0
- data/bin/lpmp +107 -0
- data/config/help.yaml +1 -0
- data/config/hosts.yaml +2 -0
- data/config/log.yaml +1 -0
- data/config/memcache.yaml +5 -0
- data/erb/index.erb +62 -0
- data/lib/bg_pull/caichen.rb +199 -0
- data/lib/bg_pull/lpmp.rb +45 -0
- data/lib/exception.rb +8 -0
- data/lib/lpmp.rb +53 -0
- data/lib/pull/lpmp.rb +355 -0
- data/lib/remote_lmp.rb +129 -0
- data/lib/utils.rb +14 -0
- data/lib/xq_push/caichen.rb +174 -0
- data/lib/xq_push/lpmp.rb +96 -0
- data/log/lpmp1st.log +1 -0
- data/public/css/ext-portal.css +40 -0
- data/public/css/lpmp.css +6 -0
- data/public/designer/caichen.epj +1 -0
- data/public/designer/hostmonitor.epj +1 -0
- data/public/ext-3.0.0/INCLUDE_ORDER.txt +35 -0
- data/public/ext-3.0.0/adapter/ext/ext-base-debug.js +3589 -0
- data/public/ext-3.0.0/adapter/ext/ext-base.js +7 -0
- data/public/ext-3.0.0/adapter/jquery/ext-jquery-adapter-debug.js +2292 -0
- data/public/ext-3.0.0/adapter/jquery/ext-jquery-adapter.js +7 -0
- data/public/ext-3.0.0/adapter/prototype/ext-prototype-adapter-debug.js +2346 -0
- data/public/ext-3.0.0/adapter/prototype/ext-prototype-adapter.js +7 -0
- data/public/ext-3.0.0/adapter/yui/ext-yui-adapter-debug.js +2136 -0
- data/public/ext-3.0.0/adapter/yui/ext-yui-adapter.js +7 -0
- data/public/ext-3.0.0/ext-all-debug.js +65610 -0
- data/public/ext-3.0.0/ext-all.js +11 -0
- data/public/ext-3.0.0/license.txt +42 -0
- data/public/ext-3.0.0/pkgs/cmp-foundation-debug.js +11287 -0
- data/public/ext-3.0.0/pkgs/cmp-foundation.js +7 -0
- data/public/ext-3.0.0/pkgs/data-foundation-debug.js +3853 -0
- data/public/ext-3.0.0/pkgs/data-foundation.js +7 -0
- data/public/ext-3.0.0/pkgs/data-grouping-debug.js +139 -0
- data/public/ext-3.0.0/pkgs/data-grouping.js +7 -0
- data/public/ext-3.0.0/pkgs/data-json-debug.js +582 -0
- data/public/ext-3.0.0/pkgs/data-json.js +7 -0
- data/public/ext-3.0.0/pkgs/data-list-views-debug.js +1278 -0
- data/public/ext-3.0.0/pkgs/data-list-views.js +7 -0
- data/public/ext-3.0.0/pkgs/data-xml-debug.js +234 -0
- data/public/ext-3.0.0/pkgs/data-xml.js +7 -0
- data/public/ext-3.0.0/pkgs/direct-debug.js +1121 -0
- data/public/ext-3.0.0/pkgs/direct.js +7 -0
- data/public/ext-3.0.0/pkgs/ext-dd-debug.js +4567 -0
- data/public/ext-3.0.0/pkgs/ext-dd.js +7 -0
- data/public/ext-3.0.0/pkgs/ext-foundation-debug.js +13417 -0
- data/public/ext-3.0.0/pkgs/ext-foundation.js +7 -0
- data/public/ext-3.0.0/pkgs/pkg-buttons-debug.js +1060 -0
- data/public/ext-3.0.0/pkgs/pkg-buttons.js +7 -0
- data/public/ext-3.0.0/pkgs/pkg-charts-debug.js +1621 -0
- data/public/ext-3.0.0/pkgs/pkg-charts.js +10 -0
- data/public/ext-3.0.0/pkgs/pkg-forms-debug.js +7661 -0
- data/public/ext-3.0.0/pkgs/pkg-forms.js +7 -0
- data/public/ext-3.0.0/pkgs/pkg-grid-editor-debug.js +560 -0
- data/public/ext-3.0.0/pkgs/pkg-grid-editor.js +7 -0
- data/public/ext-3.0.0/pkgs/pkg-grid-foundation-debug.js +4765 -0
- data/public/ext-3.0.0/pkgs/pkg-grid-foundation.js +7 -0
- data/public/ext-3.0.0/pkgs/pkg-grid-grouping-debug.js +517 -0
- data/public/ext-3.0.0/pkgs/pkg-grid-grouping.js +7 -0
- data/public/ext-3.0.0/pkgs/pkg-grid-property-debug.js +370 -0
- data/public/ext-3.0.0/pkgs/pkg-grid-property.js +7 -0
- data/public/ext-3.0.0/pkgs/pkg-history-debug.js +203 -0
- data/public/ext-3.0.0/pkgs/pkg-history.js +7 -0
- data/public/ext-3.0.0/pkgs/pkg-menu-debug.js +1628 -0
- data/public/ext-3.0.0/pkgs/pkg-menu.js +7 -0
- data/public/ext-3.0.0/pkgs/pkg-tabs-debug.js +1100 -0
- data/public/ext-3.0.0/pkgs/pkg-tabs.js +7 -0
- data/public/ext-3.0.0/pkgs/pkg-tips-debug.js +994 -0
- data/public/ext-3.0.0/pkgs/pkg-tips.js +7 -0
- data/public/ext-3.0.0/pkgs/pkg-toolbars-debug.js +1374 -0
- data/public/ext-3.0.0/pkgs/pkg-toolbars.js +7 -0
- data/public/ext-3.0.0/pkgs/pkg-tree-debug.js +4522 -0
- data/public/ext-3.0.0/pkgs/pkg-tree.js +7 -0
- data/public/ext-3.0.0/pkgs/resizable-debug.js +760 -0
- data/public/ext-3.0.0/pkgs/resizable.js +7 -0
- data/public/ext-3.0.0/pkgs/state-debug.js +274 -0
- data/public/ext-3.0.0/pkgs/state.js +7 -0
- data/public/ext-3.0.0/pkgs/window-debug.js +1888 -0
- data/public/ext-3.0.0/pkgs/window.js +7 -0
- data/public/ext-3.0.0/resources/charts.swf +0 -0
- data/public/ext-3.0.0/resources/css/README.txt +3 -0
- data/public/ext-3.0.0/resources/css/ext-all-notheme.css +5345 -0
- data/public/ext-3.0.0/resources/css/ext-all.css +6990 -0
- data/public/ext-3.0.0/resources/css/reset-min.css +7 -0
- data/public/ext-3.0.0/resources/css/structure/borders.css +54 -0
- data/public/ext-3.0.0/resources/css/structure/box.css +80 -0
- data/public/ext-3.0.0/resources/css/structure/button.css +440 -0
- data/public/ext-3.0.0/resources/css/structure/combo.css +45 -0
- data/public/ext-3.0.0/resources/css/structure/core.css +326 -0
- data/public/ext-3.0.0/resources/css/structure/date-picker.css +265 -0
- data/public/ext-3.0.0/resources/css/structure/dd.css +61 -0
- data/public/ext-3.0.0/resources/css/structure/debug.css +26 -0
- data/public/ext-3.0.0/resources/css/structure/dialog.css +62 -0
- data/public/ext-3.0.0/resources/css/structure/editor.css +92 -0
- data/public/ext-3.0.0/resources/css/structure/form.css +562 -0
- data/public/ext-3.0.0/resources/css/structure/grid.css +552 -0
- data/public/ext-3.0.0/resources/css/structure/layout.css +296 -0
- data/public/ext-3.0.0/resources/css/structure/list-view.css +85 -0
- data/public/ext-3.0.0/resources/css/structure/menu.css +205 -0
- data/public/ext-3.0.0/resources/css/structure/panel-reset.css +130 -0
- data/public/ext-3.0.0/resources/css/structure/panel.css +468 -0
- data/public/ext-3.0.0/resources/css/structure/progress.css +42 -0
- data/public/ext-3.0.0/resources/css/structure/qtips.css +153 -0
- data/public/ext-3.0.0/resources/css/structure/reset.css +7 -0
- data/public/ext-3.0.0/resources/css/structure/resizable.css +149 -0
- data/public/ext-3.0.0/resources/css/structure/slider.css +103 -0
- data/public/ext-3.0.0/resources/css/structure/tabs.css +372 -0
- data/public/ext-3.0.0/resources/css/structure/toolbar.css +259 -0
- data/public/ext-3.0.0/resources/css/structure/tree.css +203 -0
- data/public/ext-3.0.0/resources/css/structure/window.css +222 -0
- data/public/ext-3.0.0/resources/css/visual/borders.css +25 -0
- data/public/ext-3.0.0/resources/css/visual/box.css +74 -0
- data/public/ext-3.0.0/resources/css/visual/button.css +94 -0
- data/public/ext-3.0.0/resources/css/visual/combo.css +43 -0
- data/public/ext-3.0.0/resources/css/visual/core.css +76 -0
- data/public/ext-3.0.0/resources/css/visual/date-picker.css +143 -0
- data/public/ext-3.0.0/resources/css/visual/dd.css +29 -0
- data/public/ext-3.0.0/resources/css/visual/debug.css +24 -0
- data/public/ext-3.0.0/resources/css/visual/dialog.css +34 -0
- data/public/ext-3.0.0/resources/css/visual/editor.css +13 -0
- data/public/ext-3.0.0/resources/css/visual/form.css +117 -0
- data/public/ext-3.0.0/resources/css/visual/grid.css +272 -0
- data/public/ext-3.0.0/resources/css/visual/layout.css +53 -0
- data/public/ext-3.0.0/resources/css/visual/list-view.css +37 -0
- data/public/ext-3.0.0/resources/css/visual/menu.css +82 -0
- data/public/ext-3.0.0/resources/css/visual/panel.css +87 -0
- data/public/ext-3.0.0/resources/css/visual/progress.css +32 -0
- data/public/ext-3.0.0/resources/css/visual/qtips.css +44 -0
- data/public/ext-3.0.0/resources/css/visual/resizable.css +43 -0
- data/public/ext-3.0.0/resources/css/visual/slider.css +21 -0
- data/public/ext-3.0.0/resources/css/visual/tabs.css +119 -0
- data/public/ext-3.0.0/resources/css/visual/toolbar.css +103 -0
- data/public/ext-3.0.0/resources/css/visual/tree.css +157 -0
- data/public/ext-3.0.0/resources/css/visual/window.css +86 -0
- data/public/ext-3.0.0/resources/css/xtheme-blue.css +1652 -0
- data/public/ext-3.0.0/resources/expressinstall.swf +0 -0
- data/public/ext-3.0.0/resources/images/default/box/corners-blue.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/box/corners.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/box/l-blue.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/box/l.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/box/r-blue.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/box/r.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/box/tb-blue.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/box/tb.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/button/arrow.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/button/btn.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/button/group-cs.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/button/group-lr.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/button/group-tb.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/button/s-arrow-b-noline.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/button/s-arrow-b.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/button/s-arrow-bo.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/button/s-arrow-noline.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/button/s-arrow-o.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/button/s-arrow.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/dd/drop-add.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/dd/drop-no.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/dd/drop-yes.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/editor/tb-sprite.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/form/checkbox.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/form/clear-trigger.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/form/clear-trigger.psd +0 -0
- data/public/ext-3.0.0/resources/images/default/form/date-trigger.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/form/date-trigger.psd +0 -0
- data/public/ext-3.0.0/resources/images/default/form/error-tip-corners.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/form/exclamation.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/form/radio.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/form/search-trigger.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/form/search-trigger.psd +0 -0
- data/public/ext-3.0.0/resources/images/default/form/text-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/form/trigger-tpl.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/form/trigger.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/form/trigger.psd +0 -0
- data/public/ext-3.0.0/resources/images/default/gradient-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/arrow-left-white.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/arrow-right-white.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/col-move-bottom.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/col-move-top.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/columns.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/dirty.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/done.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/drop-no.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/drop-yes.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/footer-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/grid-blue-hd.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/grid-blue-split.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/grid-hrow.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/grid-loading.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/grid-split.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/grid-vista-hd.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/grid3-hd-btn.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/grid3-hrow-over.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/grid3-hrow.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/grid3-special-col-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/grid3-special-col-sel-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/group-by.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/group-collapse.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/group-expand-sprite.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/group-expand.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/hd-pop.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/hmenu-asc.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/hmenu-desc.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/hmenu-lock.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/hmenu-lock.png +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/hmenu-unlock.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/hmenu-unlock.png +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/invalid_line.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/loading.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/mso-hd.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/nowait.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/page-first-disabled.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/page-first.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/page-last-disabled.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/page-last.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/page-next-disabled.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/page-next.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/page-prev-disabled.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/page-prev.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/pick-button.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/refresh.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/row-check-sprite.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/row-expand-sprite.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/row-over.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/row-sel.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/sort-hd.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/sort_asc.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/sort_desc.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/grid/wait.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/collapse.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/expand.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/gradient-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/mini-bottom.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/mini-left.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/mini-right.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/mini-top.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/ns-collapse.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/ns-expand.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/panel-close.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/panel-title-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/panel-title-light-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/stick.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/stuck.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/tab-close-on.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/layout/tab-close.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/menu/checked.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/menu/group-checked.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/menu/item-over.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/menu/menu-parent.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/menu/menu.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/menu/unchecked.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/panel/corners-sprite.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/panel/left-right.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/panel/light-hd.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/panel/tool-sprite-tpl.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/panel/tool-sprites.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/panel/tools-sprites-trans.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/panel/top-bottom.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/panel/top-bottom.png +0 -0
- data/public/ext-3.0.0/resources/images/default/panel/white-corners-sprite.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/panel/white-left-right.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/panel/white-top-bottom.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/progress/progress-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/qtip/bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/qtip/close.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/qtip/tip-anchor-sprite.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/qtip/tip-sprite.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/s.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/shadow-c.png +0 -0
- data/public/ext-3.0.0/resources/images/default/shadow-lr.png +0 -0
- data/public/ext-3.0.0/resources/images/default/shadow.png +0 -0
- data/public/ext-3.0.0/resources/images/default/shared/blue-loading.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/shared/calendar.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/shared/glass-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/shared/hd-sprite.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/shared/large-loading.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/shared/left-btn.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/shared/loading-balls.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/shared/right-btn.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/shared/warning.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/sizer/e-handle-dark.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/sizer/e-handle.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/sizer/ne-handle-dark.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/sizer/ne-handle.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/sizer/nw-handle-dark.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/sizer/nw-handle.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/sizer/s-handle-dark.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/sizer/s-handle.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/sizer/se-handle-dark.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/sizer/se-handle.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/sizer/square.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/sizer/sw-handle-dark.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/sizer/sw-handle.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/slider/slider-bg.png +0 -0
- data/public/ext-3.0.0/resources/images/default/slider/slider-thumb.png +0 -0
- data/public/ext-3.0.0/resources/images/default/slider/slider-v-bg.png +0 -0
- data/public/ext-3.0.0/resources/images/default/slider/slider-v-thumb.png +0 -0
- data/public/ext-3.0.0/resources/images/default/tabs/scroll-left.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tabs/scroll-right.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tabs/scroller-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tabs/tab-btm-inactive-left-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tabs/tab-btm-inactive-right-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tabs/tab-btm-left-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tabs/tab-btm-right-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tabs/tab-close.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tabs/tab-strip-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tabs/tab-strip-bg.png +0 -0
- data/public/ext-3.0.0/resources/images/default/tabs/tab-strip-btm-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tabs/tabs-sprite.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/toolbar/bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/toolbar/btn-arrow-light.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/toolbar/btn-arrow.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/toolbar/btn-over-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/toolbar/gray-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/toolbar/more.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/toolbar/tb-bg.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/toolbar/tb-btn-sprite.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/toolbar/tb-xl-btn-sprite.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/toolbar/tb-xl-sep.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/arrows.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/drop-add.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/drop-between.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/drop-no.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/drop-over.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/drop-under.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/drop-yes.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/elbow-end-minus-nl.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/elbow-end-minus.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/elbow-end-plus-nl.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/elbow-end-plus.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/elbow-end.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/elbow-line.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/elbow-minus-nl.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/elbow-minus.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/elbow-plus-nl.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/elbow-plus.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/elbow.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/folder-open.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/folder.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/leaf.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/loading.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/tree/s.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/window/icon-error.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/window/icon-info.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/window/icon-question.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/window/icon-warning.gif +0 -0
- data/public/ext-3.0.0/resources/images/default/window/left-corners.png +0 -0
- data/public/ext-3.0.0/resources/images/default/window/left-corners.psd +0 -0
- data/public/ext-3.0.0/resources/images/default/window/left-right.png +0 -0
- data/public/ext-3.0.0/resources/images/default/window/left-right.psd +0 -0
- data/public/ext-3.0.0/resources/images/default/window/right-corners.png +0 -0
- data/public/ext-3.0.0/resources/images/default/window/right-corners.psd +0 -0
- data/public/ext-3.0.0/resources/images/default/window/top-bottom.png +0 -0
- data/public/ext-3.0.0/resources/images/default/window/top-bottom.psd +0 -0
- data/public/ext-3.0.0/resources/images/icon/chart.gif +0 -0
- data/public/ext-3.0.0/src/adapter/core/ext-base-ajax.js +371 -0
- data/public/ext-3.0.0/src/adapter/core/ext-base-anim-extra.js +301 -0
- data/public/ext-3.0.0/src/adapter/core/ext-base-anim.js +477 -0
- data/public/ext-3.0.0/src/adapter/core/ext-base-begin.js +18 -0
- data/public/ext-3.0.0/src/adapter/core/ext-base-dom.js +157 -0
- data/public/ext-3.0.0/src/adapter/core/ext-base-end.js +21 -0
- data/public/ext-3.0.0/src/adapter/core/ext-base-event.js +453 -0
- data/public/ext-3.0.0/src/adapter/core/ext-base-point.js +17 -0
- data/public/ext-3.0.0/src/adapter/core/ext-base-region.js +81 -0
- data/public/ext-3.0.0/src/adapter/ext-base-dom-more.js +9 -0
- data/public/ext-3.0.0/src/adapter/jquery-bridge.js +546 -0
- data/public/ext-3.0.0/src/adapter/prototype-bridge.js +600 -0
- data/public/ext-3.0.0/src/adapter/yui-bridge.js +390 -0
- data/public/ext-3.0.0/src/core/CompositeElement.js +136 -0
- data/public/ext-3.0.0/src/core/CompositeElementLite-more.js +102 -0
- data/public/ext-3.0.0/src/core/DomHelper-more.js +179 -0
- data/public/ext-3.0.0/src/core/Element-more.js +192 -0
- data/public/ext-3.0.0/src/core/Element.alignment.js +370 -0
- data/public/ext-3.0.0/src/core/Element.dd.js +46 -0
- data/public/ext-3.0.0/src/core/Element.fx-more.js +152 -0
- data/public/ext-3.0.0/src/core/Element.insertion-more.js +52 -0
- data/public/ext-3.0.0/src/core/Element.keys.js +48 -0
- data/public/ext-3.0.0/src/core/Element.legacy.js +42 -0
- data/public/ext-3.0.0/src/core/Element.position-more.js +165 -0
- data/public/ext-3.0.0/src/core/Element.scroll-more.js +110 -0
- data/public/ext-3.0.0/src/core/Element.style-more.js +318 -0
- data/public/ext-3.0.0/src/core/Error.js +81 -0
- data/public/ext-3.0.0/src/core/EventManager-more.js +334 -0
- data/public/ext-3.0.0/src/core/Ext-more.js +669 -0
- data/public/ext-3.0.0/src/core/Template-more.js +115 -0
- data/public/ext-3.0.0/src/core/core/CompositeElementLite.js +197 -0
- data/public/ext-3.0.0/src/core/core/DomHelper.js +378 -0
- data/public/ext-3.0.0/src/core/core/DomQuery.js +826 -0
- data/public/ext-3.0.0/src/core/core/Element.fx.js +324 -0
- data/public/ext-3.0.0/src/core/core/Element.insertion.js +147 -0
- data/public/ext-3.0.0/src/core/core/Element.js +945 -0
- data/public/ext-3.0.0/src/core/core/Element.position.js +303 -0
- data/public/ext-3.0.0/src/core/core/Element.scroll.js +58 -0
- data/public/ext-3.0.0/src/core/core/Element.style.js +439 -0
- data/public/ext-3.0.0/src/core/core/Element.traversal.js +176 -0
- data/public/ext-3.0.0/src/core/core/EventManager.js +623 -0
- data/public/ext-3.0.0/src/core/core/Ext.js +922 -0
- data/public/ext-3.0.0/src/core/core/Fx.js +1115 -0
- data/public/ext-3.0.0/src/core/core/Template.js +185 -0
- data/public/ext-3.0.0/src/data/Api.js +210 -0
- data/public/ext-3.0.0/src/data/ArrayReader.js +102 -0
- data/public/ext-3.0.0/src/data/ArrayStore.js +70 -0
- data/public/ext-3.0.0/src/data/DataField.js +249 -0
- data/public/ext-3.0.0/src/data/DataProxy.js +427 -0
- data/public/ext-3.0.0/src/data/DataReader.js +160 -0
- data/public/ext-3.0.0/src/data/DataWriter.js +201 -0
- data/public/ext-3.0.0/src/data/DirectProxy.js +141 -0
- data/public/ext-3.0.0/src/data/DirectStore.js +52 -0
- data/public/ext-3.0.0/src/data/GroupingStore.js +139 -0
- data/public/ext-3.0.0/src/data/HttpProxy.js +276 -0
- data/public/ext-3.0.0/src/data/JsonReader.js +311 -0
- data/public/ext-3.0.0/src/data/JsonStore.js +49 -0
- data/public/ext-3.0.0/src/data/JsonWriter.js +77 -0
- data/public/ext-3.0.0/src/data/MemoryProxy.js +69 -0
- data/public/ext-3.0.0/src/data/Record.js +400 -0
- data/public/ext-3.0.0/src/data/ScriptTagProxy.js +279 -0
- data/public/ext-3.0.0/src/data/SortTypes.js +91 -0
- data/public/ext-3.0.0/src/data/Store.js +1492 -0
- data/public/ext-3.0.0/src/data/StoreMgr.js +72 -0
- data/public/ext-3.0.0/src/data/Tree.js +785 -0
- data/public/ext-3.0.0/src/data/XmlReader.js +128 -0
- data/public/ext-3.0.0/src/data/XmlStore.js +75 -0
- data/public/ext-3.0.0/src/data/XmlWriter.js +45 -0
- data/public/ext-3.0.0/src/data/core/Connection.js +575 -0
- data/public/ext-3.0.0/src/dd/DDCore.js +2992 -0
- data/public/ext-3.0.0/src/dd/DragSource.js +365 -0
- data/public/ext-3.0.0/src/dd/DragTracker.js +217 -0
- data/public/ext-3.0.0/src/dd/DragZone.js +133 -0
- data/public/ext-3.0.0/src/dd/DropTarget.js +115 -0
- data/public/ext-3.0.0/src/dd/DropZone.js +262 -0
- data/public/ext-3.0.0/src/dd/Registry.js +127 -0
- data/public/ext-3.0.0/src/dd/ScrollManager.js +201 -0
- data/public/ext-3.0.0/src/dd/StatusProxy.js +171 -0
- data/public/ext-3.0.0/src/debug.js +906 -0
- data/public/ext-3.0.0/src/direct/Direct.js +235 -0
- data/public/ext-3.0.0/src/direct/Event.js +34 -0
- data/public/ext-3.0.0/src/direct/JsonProvider.js +45 -0
- data/public/ext-3.0.0/src/direct/PollingProvider.js +151 -0
- data/public/ext-3.0.0/src/direct/Provider.js +110 -0
- data/public/ext-3.0.0/src/direct/RemotingProvider.js +373 -0
- data/public/ext-3.0.0/src/direct/Transaction.js +32 -0
- data/public/ext-3.0.0/src/locale/ext-lang-af.js +184 -0
- data/public/ext-3.0.0/src/locale/ext-lang-bg.js +278 -0
- data/public/ext-3.0.0/src/locale/ext-lang-ca.js +315 -0
- data/public/ext-3.0.0/src/locale/ext-lang-cs.js +293 -0
- data/public/ext-3.0.0/src/locale/ext-lang-da.js +296 -0
- data/public/ext-3.0.0/src/locale/ext-lang-de.js +326 -0
- data/public/ext-3.0.0/src/locale/ext-lang-el_GR.js +309 -0
- data/public/ext-3.0.0/src/locale/ext-lang-en.js +335 -0
- data/public/ext-3.0.0/src/locale/ext-lang-en_GB.js +315 -0
- data/public/ext-3.0.0/src/locale/ext-lang-es.js +318 -0
- data/public/ext-3.0.0/src/locale/ext-lang-fa.js +272 -0
- data/public/ext-3.0.0/src/locale/ext-lang-fi.js +302 -0
- data/public/ext-3.0.0/src/locale/ext-lang-fr.js +335 -0
- data/public/ext-3.0.0/src/locale/ext-lang-fr_CA.js +218 -0
- data/public/ext-3.0.0/src/locale/ext-lang-gr.js +175 -0
- data/public/ext-3.0.0/src/locale/ext-lang-he.js +292 -0
- data/public/ext-3.0.0/src/locale/ext-lang-hr.js +295 -0
- data/public/ext-3.0.0/src/locale/ext-lang-hu.js +296 -0
- data/public/ext-3.0.0/src/locale/ext-lang-id.js +302 -0
- data/public/ext-3.0.0/src/locale/ext-lang-it.js +295 -0
- data/public/ext-3.0.0/src/locale/ext-lang-ja.js +318 -0
- data/public/ext-3.0.0/src/locale/ext-lang-ko.js +267 -0
- data/public/ext-3.0.0/src/locale/ext-lang-lt.js +333 -0
- data/public/ext-3.0.0/src/locale/ext-lang-lv.js +176 -0
- data/public/ext-3.0.0/src/locale/ext-lang-mk.js +176 -0
- data/public/ext-3.0.0/src/locale/ext-lang-nl.js +323 -0
- data/public/ext-3.0.0/src/locale/ext-lang-no_NB.js +294 -0
- data/public/ext-3.0.0/src/locale/ext-lang-no_NN.js +294 -0
- data/public/ext-3.0.0/src/locale/ext-lang-pl.js +304 -0
- data/public/ext-3.0.0/src/locale/ext-lang-pt.js +260 -0
- data/public/ext-3.0.0/src/locale/ext-lang-pt_BR.js +302 -0
- data/public/ext-3.0.0/src/locale/ext-lang-pt_PT.js +298 -0
- data/public/ext-3.0.0/src/locale/ext-lang-ro.js +295 -0
- data/public/ext-3.0.0/src/locale/ext-lang-ru.js +319 -0
- data/public/ext-3.0.0/src/locale/ext-lang-sk.js +182 -0
- data/public/ext-3.0.0/src/locale/ext-lang-sl.js +176 -0
- data/public/ext-3.0.0/src/locale/ext-lang-sr.js +179 -0
- data/public/ext-3.0.0/src/locale/ext-lang-sr_RS.js +178 -0
- data/public/ext-3.0.0/src/locale/ext-lang-sv_SE.js +178 -0
- data/public/ext-3.0.0/src/locale/ext-lang-th.js +294 -0
- data/public/ext-3.0.0/src/locale/ext-lang-tr.js +306 -0
- data/public/ext-3.0.0/src/locale/ext-lang-ukr.js +258 -0
- data/public/ext-3.0.0/src/locale/ext-lang-vn.js +181 -0
- data/public/ext-3.0.0/src/locale/ext-lang-zh_CN.js +174 -0
- data/public/ext-3.0.0/src/locale/ext-lang-zh_TW.js +178 -0
- data/public/ext-3.0.0/src/state/CookieProvider.js +91 -0
- data/public/ext-3.0.0/src/state/Provider.js +127 -0
- data/public/ext-3.0.0/src/state/StateManager.js +69 -0
- data/public/ext-3.0.0/src/util/CSS.js +161 -0
- data/public/ext-3.0.0/src/util/ClickRepeater.js +200 -0
- data/public/ext-3.0.0/src/util/Cookies.js +96 -0
- data/public/ext-3.0.0/src/util/Date.js +1317 -0
- data/public/ext-3.0.0/src/util/Format.js +356 -0
- data/public/ext-3.0.0/src/util/History.js +203 -0
- data/public/ext-3.0.0/src/util/KeyMap.js +242 -0
- data/public/ext-3.0.0/src/util/KeyNav.js +161 -0
- data/public/ext-3.0.0/src/util/MixedCollection.js +576 -0
- data/public/ext-3.0.0/src/util/Observable-more.js +178 -0
- data/public/ext-3.0.0/src/util/TextMetrics.js +131 -0
- data/public/ext-3.0.0/src/util/UpdateManager.js +536 -0
- data/public/ext-3.0.0/src/util/XTemplate.js +379 -0
- data/public/ext-3.0.0/src/util/core/DelayedTask.js +68 -0
- data/public/ext-3.0.0/src/util/core/JSON.js +174 -0
- data/public/ext-3.0.0/src/util/core/Observable.js +483 -0
- data/public/ext-3.0.0/src/util/core/TaskMgr.js +174 -0
- data/public/ext-3.0.0/src/widgets/Action.js +252 -0
- data/public/ext-3.0.0/src/widgets/BoxComponent.js +519 -0
- data/public/ext-3.0.0/src/widgets/Button.js +762 -0
- data/public/ext-3.0.0/src/widgets/ButtonGroup.js +103 -0
- data/public/ext-3.0.0/src/widgets/ColorPalette.js +148 -0
- data/public/ext-3.0.0/src/widgets/Component.js +1540 -0
- data/public/ext-3.0.0/src/widgets/ComponentMgr.js +159 -0
- data/public/ext-3.0.0/src/widgets/Container.js +894 -0
- data/public/ext-3.0.0/src/widgets/CycleButton.js +188 -0
- data/public/ext-3.0.0/src/widgets/DataView.js +749 -0
- data/public/ext-3.0.0/src/widgets/DatePicker.js +771 -0
- data/public/ext-3.0.0/src/widgets/Editor.js +385 -0
- data/public/ext-3.0.0/src/widgets/Layer.js +466 -0
- data/public/ext-3.0.0/src/widgets/LoadMask.js +123 -0
- data/public/ext-3.0.0/src/widgets/MessageBox.js +626 -0
- data/public/ext-3.0.0/src/widgets/PagingToolbar.js +502 -0
- data/public/ext-3.0.0/src/widgets/Panel.js +1772 -0
- data/public/ext-3.0.0/src/widgets/PanelDD.js +154 -0
- data/public/ext-3.0.0/src/widgets/ProgressBar.js +289 -0
- data/public/ext-3.0.0/src/widgets/Resizable.js +760 -0
- data/public/ext-3.0.0/src/widgets/Shadow.js +192 -0
- data/public/ext-3.0.0/src/widgets/Slider.js +426 -0
- data/public/ext-3.0.0/src/widgets/SplitBar.js +436 -0
- data/public/ext-3.0.0/src/widgets/SplitButton.js +124 -0
- data/public/ext-3.0.0/src/widgets/TabPanel.js +1100 -0
- data/public/ext-3.0.0/src/widgets/Toolbar.js +781 -0
- data/public/ext-3.0.0/src/widgets/Viewport.js +124 -0
- data/public/ext-3.0.0/src/widgets/Window.js +941 -0
- data/public/ext-3.0.0/src/widgets/WindowManager.js +187 -0
- data/public/ext-3.0.0/src/widgets/chart/Chart.js +721 -0
- data/public/ext-3.0.0/src/widgets/chart/EventProxy.js +20 -0
- data/public/ext-3.0.0/src/widgets/chart/FlashComponent.js +117 -0
- data/public/ext-3.0.0/src/widgets/chart/swfobject.js +783 -0
- data/public/ext-3.0.0/src/widgets/form/Action.js +626 -0
- data/public/ext-3.0.0/src/widgets/form/BasicForm.js +735 -0
- data/public/ext-3.0.0/src/widgets/form/Checkbox.js +177 -0
- data/public/ext-3.0.0/src/widgets/form/CheckboxGroup.js +419 -0
- data/public/ext-3.0.0/src/widgets/form/Combo.js +1232 -0
- data/public/ext-3.0.0/src/widgets/form/DateField.js +389 -0
- data/public/ext-3.0.0/src/widgets/form/DisplayField.js +98 -0
- data/public/ext-3.0.0/src/widgets/form/Field.js +640 -0
- data/public/ext-3.0.0/src/widgets/form/FieldSet.js +305 -0
- data/public/ext-3.0.0/src/widgets/form/Form.js +335 -0
- data/public/ext-3.0.0/src/widgets/form/Hidden.js +39 -0
- data/public/ext-3.0.0/src/widgets/form/HtmlEditor.js +1179 -0
- data/public/ext-3.0.0/src/widgets/form/Label.js +64 -0
- data/public/ext-3.0.0/src/widgets/form/NumberField.js +139 -0
- data/public/ext-3.0.0/src/widgets/form/Radio.js +81 -0
- data/public/ext-3.0.0/src/widgets/form/RadioGroup.js +116 -0
- data/public/ext-3.0.0/src/widgets/form/TextArea.js +117 -0
- data/public/ext-3.0.0/src/widgets/form/TextField.js +491 -0
- data/public/ext-3.0.0/src/widgets/form/TimeField.js +146 -0
- data/public/ext-3.0.0/src/widgets/form/TriggerField.js +328 -0
- data/public/ext-3.0.0/src/widgets/form/VTypes.js +135 -0
- data/public/ext-3.0.0/src/widgets/grid/AbstractSelectionModel.js +57 -0
- data/public/ext-3.0.0/src/widgets/grid/CellSelectionModel.js +262 -0
- data/public/ext-3.0.0/src/widgets/grid/CheckboxSelectionModel.js +103 -0
- data/public/ext-3.0.0/src/widgets/grid/Column.js +406 -0
- data/public/ext-3.0.0/src/widgets/grid/ColumnDD.js +199 -0
- data/public/ext-3.0.0/src/widgets/grid/ColumnModel.js +592 -0
- data/public/ext-3.0.0/src/widgets/grid/ColumnSplitDD.js +62 -0
- data/public/ext-3.0.0/src/widgets/grid/EditorGrid.js +291 -0
- data/public/ext-3.0.0/src/widgets/grid/GridDD.js +95 -0
- data/public/ext-3.0.0/src/widgets/grid/GridEditor.js +21 -0
- data/public/ext-3.0.0/src/widgets/grid/GridPanel.js +952 -0
- data/public/ext-3.0.0/src/widgets/grid/GridView.js +1776 -0
- data/public/ext-3.0.0/src/widgets/grid/GroupingView.js +517 -0
- data/public/ext-3.0.0/src/widgets/grid/PropertyGrid.js +370 -0
- data/public/ext-3.0.0/src/widgets/grid/RowNumberer.js +61 -0
- data/public/ext-3.0.0/src/widgets/grid/RowSelectionModel.js +530 -0
- data/public/ext-3.0.0/src/widgets/layout/AbsoluteLayout.js +82 -0
- data/public/ext-3.0.0/src/widgets/layout/AccordionLayout.js +177 -0
- data/public/ext-3.0.0/src/widgets/layout/AnchorLayout.js +200 -0
- data/public/ext-3.0.0/src/widgets/layout/BorderLayout.js +1108 -0
- data/public/ext-3.0.0/src/widgets/layout/BoxLayout.js +417 -0
- data/public/ext-3.0.0/src/widgets/layout/CardLayout.js +127 -0
- data/public/ext-3.0.0/src/widgets/layout/ColumnLayout.js +130 -0
- data/public/ext-3.0.0/src/widgets/layout/ContainerLayout.js +215 -0
- data/public/ext-3.0.0/src/widgets/layout/FitLayout.js +48 -0
- data/public/ext-3.0.0/src/widgets/layout/FormLayout.js +266 -0
- data/public/ext-3.0.0/src/widgets/layout/TableLayout.js +194 -0
- data/public/ext-3.0.0/src/widgets/list/ColumnResizer.js +123 -0
- data/public/ext-3.0.0/src/widgets/list/ListView.js +357 -0
- data/public/ext-3.0.0/src/widgets/list/Sorter.js +70 -0
- data/public/ext-3.0.0/src/widgets/menu/BaseItem.js +160 -0
- data/public/ext-3.0.0/src/widgets/menu/CheckItem.js +114 -0
- data/public/ext-3.0.0/src/widgets/menu/ColorMenu.js +72 -0
- data/public/ext-3.0.0/src/widgets/menu/DateMenu.js +90 -0
- data/public/ext-3.0.0/src/widgets/menu/Item.js +211 -0
- data/public/ext-3.0.0/src/widgets/menu/Menu.js +733 -0
- data/public/ext-3.0.0/src/widgets/menu/MenuMgr.js +211 -0
- data/public/ext-3.0.0/src/widgets/menu/Separator.js +46 -0
- data/public/ext-3.0.0/src/widgets/menu/TextItem.js +46 -0
- data/public/ext-3.0.0/src/widgets/tips/QuickTip.js +207 -0
- data/public/ext-3.0.0/src/widgets/tips/QuickTips.js +159 -0
- data/public/ext-3.0.0/src/widgets/tips/Tip.js +157 -0
- data/public/ext-3.0.0/src/widgets/tips/ToolTip.js +492 -0
- data/public/ext-3.0.0/src/widgets/tree/AsyncTreeNode.js +114 -0
- data/public/ext-3.0.0/src/widgets/tree/TreeDragZone.js +82 -0
- data/public/ext-3.0.0/src/widgets/tree/TreeDropZone.js +321 -0
- data/public/ext-3.0.0/src/widgets/tree/TreeEditor.js +160 -0
- data/public/ext-3.0.0/src/widgets/tree/TreeEventModel.js +169 -0
- data/public/ext-3.0.0/src/widgets/tree/TreeFilter.js +114 -0
- data/public/ext-3.0.0/src/widgets/tree/TreeLoader.js +342 -0
- data/public/ext-3.0.0/src/widgets/tree/TreeNode.js +546 -0
- data/public/ext-3.0.0/src/widgets/tree/TreeNodeUI.js +633 -0
- data/public/ext-3.0.0/src/widgets/tree/TreePanel.js +918 -0
- data/public/ext-3.0.0/src/widgets/tree/TreeSelectionModel.js +315 -0
- data/public/ext-3.0.0/src/widgets/tree/TreeSorter.js +106 -0
- data/public/js/ext-portal.js +235 -0
- data/public/js/global.js +7 -0
- data/public/js/outerframe.js +47 -0
- data/public/js/portal.js +713 -0
- data/public/js/test_chart.js +152 -0
- data/test/config.rb +62 -0
- data/test/config/hosts.yaml +5 -0
- data/test/config/log.yaml +1 -0
- data/test/config/memcache.yaml +5 -0
- data/test/exception.rb +39 -0
- data/test/method_missing.rb +14 -0
- data/test/module.rb +39 -0
- data/test/remote_lmp.rb +126 -0
- data/test/sinatra.rb +29 -0
- data/test/sinatra_base.rb +16 -0
- metadata +690 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Ext JS Library 3.0.0
|
|
3
|
+
* Copyright(c) 2006-2009 Ext JS, LLC
|
|
4
|
+
* licensing@extjs.com
|
|
5
|
+
* http://www.extjs.com/license
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
@class Ext.util.ClickRepeater
|
|
9
|
+
@extends Ext.util.Observable
|
|
10
|
+
|
|
11
|
+
A wrapper class which can be applied to any element. Fires a "click" event while the
|
|
12
|
+
mouse is pressed. The interval between firings may be specified in the config but
|
|
13
|
+
defaults to 20 milliseconds.
|
|
14
|
+
|
|
15
|
+
Optionally, a CSS class may be applied to the element during the time it is pressed.
|
|
16
|
+
|
|
17
|
+
@cfg {Mixed} el The element to act as a button.
|
|
18
|
+
@cfg {Number} delay The initial delay before the repeating event begins firing.
|
|
19
|
+
Similar to an autorepeat key delay.
|
|
20
|
+
@cfg {Number} interval The interval between firings of the "click" event. Default 20 ms.
|
|
21
|
+
@cfg {String} pressClass A CSS class name to be applied to the element while pressed.
|
|
22
|
+
@cfg {Boolean} accelerate True if autorepeating should start slowly and accelerate.
|
|
23
|
+
"interval" and "delay" are ignored.
|
|
24
|
+
@cfg {Boolean} preventDefault True to prevent the default click event
|
|
25
|
+
@cfg {Boolean} stopDefault True to stop the default click event
|
|
26
|
+
|
|
27
|
+
@history
|
|
28
|
+
2007-02-02 jvs Original code contributed by Nige "Animal" White
|
|
29
|
+
2007-02-02 jvs Renamed to ClickRepeater
|
|
30
|
+
2007-02-03 jvs Modifications for FF Mac and Safari
|
|
31
|
+
|
|
32
|
+
@constructor
|
|
33
|
+
@param {Mixed} el The element to listen on
|
|
34
|
+
@param {Object} config
|
|
35
|
+
*/
|
|
36
|
+
Ext.util.ClickRepeater = function(el, config)
|
|
37
|
+
{
|
|
38
|
+
this.el = Ext.get(el);
|
|
39
|
+
this.el.unselectable();
|
|
40
|
+
|
|
41
|
+
Ext.apply(this, config);
|
|
42
|
+
|
|
43
|
+
this.addEvents(
|
|
44
|
+
/**
|
|
45
|
+
* @event mousedown
|
|
46
|
+
* Fires when the mouse button is depressed.
|
|
47
|
+
* @param {Ext.util.ClickRepeater} this
|
|
48
|
+
*/
|
|
49
|
+
"mousedown",
|
|
50
|
+
/**
|
|
51
|
+
* @event click
|
|
52
|
+
* Fires on a specified interval during the time the element is pressed.
|
|
53
|
+
* @param {Ext.util.ClickRepeater} this
|
|
54
|
+
*/
|
|
55
|
+
"click",
|
|
56
|
+
/**
|
|
57
|
+
* @event mouseup
|
|
58
|
+
* Fires when the mouse key is released.
|
|
59
|
+
* @param {Ext.util.ClickRepeater} this
|
|
60
|
+
*/
|
|
61
|
+
"mouseup"
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
if(!this.disabled){
|
|
65
|
+
this.disabled = true;
|
|
66
|
+
this.enable();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// allow inline handler
|
|
70
|
+
if(this.handler){
|
|
71
|
+
this.on("click", this.handler, this.scope || this);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
Ext.util.ClickRepeater.superclass.constructor.call(this);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, {
|
|
78
|
+
interval : 20,
|
|
79
|
+
delay: 250,
|
|
80
|
+
preventDefault : true,
|
|
81
|
+
stopDefault : false,
|
|
82
|
+
timer : 0,
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Enables the repeater and allows events to fire.
|
|
86
|
+
*/
|
|
87
|
+
enable: function(){
|
|
88
|
+
if(this.disabled){
|
|
89
|
+
this.el.on('mousedown', this.handleMouseDown, this);
|
|
90
|
+
if(this.preventDefault || this.stopDefault){
|
|
91
|
+
this.el.on('click', this.eventOptions, this);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
this.disabled = false;
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Disables the repeater and stops events from firing.
|
|
99
|
+
*/
|
|
100
|
+
disable: function(/* private */ force){
|
|
101
|
+
if(force || !this.disabled){
|
|
102
|
+
clearTimeout(this.timer);
|
|
103
|
+
if(this.pressClass){
|
|
104
|
+
this.el.removeClass(this.pressClass);
|
|
105
|
+
}
|
|
106
|
+
Ext.getDoc().un('mouseup', this.handleMouseUp, this);
|
|
107
|
+
this.el.removeAllListeners();
|
|
108
|
+
}
|
|
109
|
+
this.disabled = true;
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Convenience function for setting disabled/enabled by boolean.
|
|
114
|
+
* @param {Boolean} disabled
|
|
115
|
+
*/
|
|
116
|
+
setDisabled: function(disabled){
|
|
117
|
+
this[disabled ? 'disable' : 'enable']();
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
eventOptions: function(e){
|
|
121
|
+
if(this.preventDefault){
|
|
122
|
+
e.preventDefault();
|
|
123
|
+
}
|
|
124
|
+
if(this.stopDefault){
|
|
125
|
+
e.stopEvent();
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
// private
|
|
130
|
+
destroy : function() {
|
|
131
|
+
this.disable(true);
|
|
132
|
+
Ext.destroy(this.el);
|
|
133
|
+
this.purgeListeners();
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
// private
|
|
137
|
+
handleMouseDown : function(){
|
|
138
|
+
clearTimeout(this.timer);
|
|
139
|
+
this.el.blur();
|
|
140
|
+
if(this.pressClass){
|
|
141
|
+
this.el.addClass(this.pressClass);
|
|
142
|
+
}
|
|
143
|
+
this.mousedownTime = new Date();
|
|
144
|
+
|
|
145
|
+
Ext.getDoc().on("mouseup", this.handleMouseUp, this);
|
|
146
|
+
this.el.on("mouseout", this.handleMouseOut, this);
|
|
147
|
+
|
|
148
|
+
this.fireEvent("mousedown", this);
|
|
149
|
+
this.fireEvent("click", this);
|
|
150
|
+
|
|
151
|
+
// Do not honor delay or interval if acceleration wanted.
|
|
152
|
+
if (this.accelerate) {
|
|
153
|
+
this.delay = 400;
|
|
154
|
+
}
|
|
155
|
+
this.timer = this.click.defer(this.delay || this.interval, this);
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
// private
|
|
159
|
+
click : function(){
|
|
160
|
+
this.fireEvent("click", this);
|
|
161
|
+
this.timer = this.click.defer(this.accelerate ?
|
|
162
|
+
this.easeOutExpo(this.mousedownTime.getElapsed(),
|
|
163
|
+
400,
|
|
164
|
+
-390,
|
|
165
|
+
12000) :
|
|
166
|
+
this.interval, this);
|
|
167
|
+
},
|
|
168
|
+
|
|
169
|
+
easeOutExpo : function (t, b, c, d) {
|
|
170
|
+
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
// private
|
|
174
|
+
handleMouseOut : function(){
|
|
175
|
+
clearTimeout(this.timer);
|
|
176
|
+
if(this.pressClass){
|
|
177
|
+
this.el.removeClass(this.pressClass);
|
|
178
|
+
}
|
|
179
|
+
this.el.on("mouseover", this.handleMouseReturn, this);
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
// private
|
|
183
|
+
handleMouseReturn : function(){
|
|
184
|
+
this.el.un("mouseover", this.handleMouseReturn, this);
|
|
185
|
+
if(this.pressClass){
|
|
186
|
+
this.el.addClass(this.pressClass);
|
|
187
|
+
}
|
|
188
|
+
this.click();
|
|
189
|
+
},
|
|
190
|
+
|
|
191
|
+
// private
|
|
192
|
+
handleMouseUp : function(){
|
|
193
|
+
clearTimeout(this.timer);
|
|
194
|
+
this.el.un("mouseover", this.handleMouseReturn, this);
|
|
195
|
+
this.el.un("mouseout", this.handleMouseOut, this);
|
|
196
|
+
Ext.getDoc().un("mouseup", this.handleMouseUp, this);
|
|
197
|
+
this.el.removeClass(this.pressClass);
|
|
198
|
+
this.fireEvent("mouseup", this);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Ext JS Library 3.0.0
|
|
3
|
+
* Copyright(c) 2006-2009 Ext JS, LLC
|
|
4
|
+
* licensing@extjs.com
|
|
5
|
+
* http://www.extjs.com/license
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* @class Ext.util.Cookies
|
|
9
|
+
* Utility class for managing and interacting with cookies.
|
|
10
|
+
* @singleton
|
|
11
|
+
*/
|
|
12
|
+
Ext.util.Cookies = {
|
|
13
|
+
/**
|
|
14
|
+
* Create a cookie with the specified name and value. Additional settings
|
|
15
|
+
* for the cookie may be optionally specified (for example: expiration,
|
|
16
|
+
* access restriction, SSL).
|
|
17
|
+
* @param {Object} name
|
|
18
|
+
* @param {Object} value
|
|
19
|
+
* @param {Object} expires (Optional) Specify an expiration date the
|
|
20
|
+
* cookie is to persist until. Note that the specified Date object will
|
|
21
|
+
* be converted to Greenwich Mean Time (GMT).
|
|
22
|
+
* @param {String} path (Optional) Setting a path on the cookie restricts
|
|
23
|
+
* access to pages that match that path. Defaults to all pages (<tt>'/'</tt>).
|
|
24
|
+
* @param {String} domain (Optional) Setting a domain restricts access to
|
|
25
|
+
* pages on a given domain (typically used to allow cookie access across
|
|
26
|
+
* subdomains). For example, "extjs.com" will create a cookie that can be
|
|
27
|
+
* accessed from any subdomain of extjs.com, including www.extjs.com,
|
|
28
|
+
* support.extjs.com, etc.
|
|
29
|
+
* @param {Boolean} secure (Optional) Specify true to indicate that the cookie
|
|
30
|
+
* should only be accessible via SSL on a page using the HTTPS protocol.
|
|
31
|
+
* Defaults to <tt>false</tt>. Note that this will only work if the page
|
|
32
|
+
* calling this code uses the HTTPS protocol, otherwise the cookie will be
|
|
33
|
+
* created with default options.
|
|
34
|
+
*/
|
|
35
|
+
set : function(name, value){
|
|
36
|
+
var argv = arguments;
|
|
37
|
+
var argc = arguments.length;
|
|
38
|
+
var expires = (argc > 2) ? argv[2] : null;
|
|
39
|
+
var path = (argc > 3) ? argv[3] : '/';
|
|
40
|
+
var domain = (argc > 4) ? argv[4] : null;
|
|
41
|
+
var secure = (argc > 5) ? argv[5] : false;
|
|
42
|
+
document.cookie = name + "=" + escape(value) + ((expires === null) ? "" : ("; expires=" + expires.toGMTString())) + ((path === null) ? "" : ("; path=" + path)) + ((domain === null) ? "" : ("; domain=" + domain)) + ((secure === true) ? "; secure" : "");
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Retrieves cookies that are accessible by the current page. If a cookie
|
|
47
|
+
* does not exist, <code>get()</code> returns <tt>null</tt>. The following
|
|
48
|
+
* example retrieves the cookie called "valid" and stores the String value
|
|
49
|
+
* in the variable <tt>validStatus</tt>.
|
|
50
|
+
* <pre><code>
|
|
51
|
+
* var validStatus = Ext.util.Cookies.get("valid");
|
|
52
|
+
* </code></pre>
|
|
53
|
+
* @param {Object} name The name of the cookie to get
|
|
54
|
+
* @return {Mixed} Returns the cookie value for the specified name;
|
|
55
|
+
* null if the cookie name does not exist.
|
|
56
|
+
*/
|
|
57
|
+
get : function(name){
|
|
58
|
+
var arg = name + "=";
|
|
59
|
+
var alen = arg.length;
|
|
60
|
+
var clen = document.cookie.length;
|
|
61
|
+
var i = 0;
|
|
62
|
+
var j = 0;
|
|
63
|
+
while(i < clen){
|
|
64
|
+
j = i + alen;
|
|
65
|
+
if(document.cookie.substring(i, j) == arg){
|
|
66
|
+
return Ext.util.Cookies.getCookieVal(j);
|
|
67
|
+
}
|
|
68
|
+
i = document.cookie.indexOf(" ", i) + 1;
|
|
69
|
+
if(i === 0){
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Removes a cookie with the provided name from the browser
|
|
78
|
+
* if found.
|
|
79
|
+
* @param {Object} name The name of the cookie to remove
|
|
80
|
+
*/
|
|
81
|
+
clear : function(name){
|
|
82
|
+
if(Ext.util.Cookies.get(name)){
|
|
83
|
+
document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* @private
|
|
88
|
+
*/
|
|
89
|
+
getCookieVal : function(offset){
|
|
90
|
+
var endstr = document.cookie.indexOf(";", offset);
|
|
91
|
+
if(endstr == -1){
|
|
92
|
+
endstr = document.cookie.length;
|
|
93
|
+
}
|
|
94
|
+
return unescape(document.cookie.substring(offset, endstr));
|
|
95
|
+
}
|
|
96
|
+
};
|
|
@@ -0,0 +1,1317 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Ext JS Library 3.0.0
|
|
3
|
+
* Copyright(c) 2006-2009 Ext JS, LLC
|
|
4
|
+
* licensing@extjs.com
|
|
5
|
+
* http://www.extjs.com/license
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* @class Date
|
|
9
|
+
*
|
|
10
|
+
* The date parsing and formatting syntax contains a subset of
|
|
11
|
+
* <a href="http://www.php.net/date">PHP's date() function</a>, and the formats that are
|
|
12
|
+
* supported will provide results equivalent to their PHP versions.
|
|
13
|
+
*
|
|
14
|
+
* The following is a list of all currently supported formats:
|
|
15
|
+
* <pre>
|
|
16
|
+
Format Description Example returned values
|
|
17
|
+
------ ----------------------------------------------------------------------- -----------------------
|
|
18
|
+
d Day of the month, 2 digits with leading zeros 01 to 31
|
|
19
|
+
D A short textual representation of the day of the week Mon to Sun
|
|
20
|
+
j Day of the month without leading zeros 1 to 31
|
|
21
|
+
l A full textual representation of the day of the week Sunday to Saturday
|
|
22
|
+
N ISO-8601 numeric representation of the day of the week 1 (for Monday) through 7 (for Sunday)
|
|
23
|
+
S English ordinal suffix for the day of the month, 2 characters st, nd, rd or th. Works well with j
|
|
24
|
+
w Numeric representation of the day of the week 0 (for Sunday) to 6 (for Saturday)
|
|
25
|
+
z The day of the year (starting from 0) 0 to 364 (365 in leap years)
|
|
26
|
+
W ISO-8601 week number of year, weeks starting on Monday 01 to 53
|
|
27
|
+
F A full textual representation of a month, such as January or March January to December
|
|
28
|
+
m Numeric representation of a month, with leading zeros 01 to 12
|
|
29
|
+
M A short textual representation of a month Jan to Dec
|
|
30
|
+
n Numeric representation of a month, without leading zeros 1 to 12
|
|
31
|
+
t Number of days in the given month 28 to 31
|
|
32
|
+
L Whether it's a leap year 1 if it is a leap year, 0 otherwise.
|
|
33
|
+
o ISO-8601 year number (identical to (Y), but if the ISO week number (W) Examples: 1998 or 2004
|
|
34
|
+
belongs to the previous or next year, that year is used instead)
|
|
35
|
+
Y A full numeric representation of a year, 4 digits Examples: 1999 or 2003
|
|
36
|
+
y A two digit representation of a year Examples: 99 or 03
|
|
37
|
+
a Lowercase Ante meridiem and Post meridiem am or pm
|
|
38
|
+
A Uppercase Ante meridiem and Post meridiem AM or PM
|
|
39
|
+
g 12-hour format of an hour without leading zeros 1 to 12
|
|
40
|
+
G 24-hour format of an hour without leading zeros 0 to 23
|
|
41
|
+
h 12-hour format of an hour with leading zeros 01 to 12
|
|
42
|
+
H 24-hour format of an hour with leading zeros 00 to 23
|
|
43
|
+
i Minutes, with leading zeros 00 to 59
|
|
44
|
+
s Seconds, with leading zeros 00 to 59
|
|
45
|
+
u Decimal fraction of a second Examples:
|
|
46
|
+
(minimum 1 digit, arbitrary number of digits allowed) 001 (i.e. 0.001s) or
|
|
47
|
+
100 (i.e. 0.100s) or
|
|
48
|
+
999 (i.e. 0.999s) or
|
|
49
|
+
999876543210 (i.e. 0.999876543210s)
|
|
50
|
+
O Difference to Greenwich time (GMT) in hours and minutes Example: +1030
|
|
51
|
+
P Difference to Greenwich time (GMT) with colon between hours and minutes Example: -08:00
|
|
52
|
+
T Timezone abbreviation of the machine running the code Examples: EST, MDT, PDT ...
|
|
53
|
+
Z Timezone offset in seconds (negative if west of UTC, positive if east) -43200 to 50400
|
|
54
|
+
c ISO 8601 date
|
|
55
|
+
Notes: Examples:
|
|
56
|
+
1) If unspecified, the month / day defaults to the current month / day, 1991 or
|
|
57
|
+
the time defaults to midnight, while the timezone defaults to the 1992-10 or
|
|
58
|
+
browser's timezone. If a time is specified, it must include both hours 1993-09-20 or
|
|
59
|
+
and minutes. The "T" delimiter, seconds, milliseconds and timezone 1994-08-19T16:20+01:00 or
|
|
60
|
+
are optional. 1995-07-18T17:21:28-02:00 or
|
|
61
|
+
2) The decimal fraction of a second, if specified, must contain at 1996-06-17T18:22:29.98765+03:00 or
|
|
62
|
+
least 1 digit (there is no limit to the maximum number 1997-05-16T19:23:30,12345-0400 or
|
|
63
|
+
of digits allowed), and may be delimited by either a '.' or a ',' 1998-04-15T20:24:31.2468Z or
|
|
64
|
+
Refer to the examples on the right for the various levels of 1999-03-14T20:24:32Z or
|
|
65
|
+
date-time granularity which are supported, or see 2000-02-13T21:25:33
|
|
66
|
+
http://www.w3.org/TR/NOTE-datetime for more info. 2001-01-12 22:26:34
|
|
67
|
+
U Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) 1193432466 or -2138434463
|
|
68
|
+
M$ Microsoft AJAX serialized dates \/Date(1238606590509)\/ (i.e. UTC milliseconds since epoch) or
|
|
69
|
+
\/Date(1238606590509+0800)\/
|
|
70
|
+
</pre>
|
|
71
|
+
*
|
|
72
|
+
* Example usage (note that you must escape format specifiers with '\\' to render them as character literals):
|
|
73
|
+
* <pre><code>
|
|
74
|
+
// Sample date:
|
|
75
|
+
// 'Wed Jan 10 2007 15:05:01 GMT-0600 (Central Standard Time)'
|
|
76
|
+
|
|
77
|
+
var dt = new Date('1/10/2007 03:05:01 PM GMT-0600');
|
|
78
|
+
document.write(dt.format('Y-m-d')); // 2007-01-10
|
|
79
|
+
document.write(dt.format('F j, Y, g:i a')); // January 10, 2007, 3:05 pm
|
|
80
|
+
document.write(dt.format('l, \\t\\he jS \\of F Y h:i:s A')); // Wednesday, the 10th of January 2007 03:05:01 PM
|
|
81
|
+
</code></pre>
|
|
82
|
+
*
|
|
83
|
+
* Here are some standard date/time patterns that you might find helpful. They
|
|
84
|
+
* are not part of the source of Date.js, but to use them you can simply copy this
|
|
85
|
+
* block of code into any script that is included after Date.js and they will also become
|
|
86
|
+
* globally available on the Date object. Feel free to add or remove patterns as needed in your code.
|
|
87
|
+
* <pre><code>
|
|
88
|
+
Date.patterns = {
|
|
89
|
+
ISO8601Long:"Y-m-d H:i:s",
|
|
90
|
+
ISO8601Short:"Y-m-d",
|
|
91
|
+
ShortDate: "n/j/Y",
|
|
92
|
+
LongDate: "l, F d, Y",
|
|
93
|
+
FullDateTime: "l, F d, Y g:i:s A",
|
|
94
|
+
MonthDay: "F d",
|
|
95
|
+
ShortTime: "g:i A",
|
|
96
|
+
LongTime: "g:i:s A",
|
|
97
|
+
SortableDateTime: "Y-m-d\\TH:i:s",
|
|
98
|
+
UniversalSortableDateTime: "Y-m-d H:i:sO",
|
|
99
|
+
YearMonth: "F, Y"
|
|
100
|
+
};
|
|
101
|
+
</code></pre>
|
|
102
|
+
*
|
|
103
|
+
* Example usage:
|
|
104
|
+
* <pre><code>
|
|
105
|
+
var dt = new Date();
|
|
106
|
+
document.write(dt.format(Date.patterns.ShortDate));
|
|
107
|
+
</code></pre>
|
|
108
|
+
* <p>Developer-written, custom formats may be used by supplying both a formatting and a parsing function
|
|
109
|
+
* which perform to specialized requirements. The functions are stored in {@link #parseFunctions} and {@link #formatFunctions}.</p>
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
/*
|
|
113
|
+
* Most of the date-formatting functions below are the excellent work of Baron Schwartz.
|
|
114
|
+
* (see http://www.xaprb.com/blog/2005/12/12/javascript-closures-for-runtime-efficiency/)
|
|
115
|
+
* They generate precompiled functions from format patterns instead of parsing and
|
|
116
|
+
* processing each pattern every time a date is formatted. These functions are available
|
|
117
|
+
* on every Date object.
|
|
118
|
+
*/
|
|
119
|
+
|
|
120
|
+
(function() {
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Global flag which determines if strict date parsing should be used.
|
|
124
|
+
* Strict date parsing will not roll-over invalid dates, which is the
|
|
125
|
+
* default behaviour of javascript Date objects.
|
|
126
|
+
* (see {@link #parseDate} for more information)
|
|
127
|
+
* Defaults to <tt>false</tt>.
|
|
128
|
+
* @static
|
|
129
|
+
* @type Boolean
|
|
130
|
+
*/
|
|
131
|
+
Date.useStrict = false;
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
// create private copy of Ext's String.format() method
|
|
135
|
+
// - to remove unnecessary dependency
|
|
136
|
+
// - to resolve namespace conflict with M$-Ajax's implementation
|
|
137
|
+
function xf(format) {
|
|
138
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
|
139
|
+
return format.replace(/\{(\d+)\}/g, function(m, i) {
|
|
140
|
+
return args[i];
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
// private
|
|
146
|
+
Date.formatCodeToRegex = function(character, currentGroup) {
|
|
147
|
+
// Note: currentGroup - position in regex result array (see notes for Date.parseCodes below)
|
|
148
|
+
var p = Date.parseCodes[character];
|
|
149
|
+
|
|
150
|
+
if (p) {
|
|
151
|
+
p = typeof p == 'function'? p() : p;
|
|
152
|
+
Date.parseCodes[character] = p; // reassign function result to prevent repeated execution
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return p? Ext.applyIf({
|
|
156
|
+
c: p.c? xf(p.c, currentGroup || "{0}") : p.c
|
|
157
|
+
}, p) : {
|
|
158
|
+
g:0,
|
|
159
|
+
c:null,
|
|
160
|
+
s:Ext.escapeRe(character) // treat unrecognised characters as literals
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// private shorthand for Date.formatCodeToRegex since we'll be using it fairly often
|
|
165
|
+
var $f = Date.formatCodeToRegex;
|
|
166
|
+
|
|
167
|
+
Ext.apply(Date, {
|
|
168
|
+
/**
|
|
169
|
+
* <p>An object hash in which each property is a date parsing function. The property name is the
|
|
170
|
+
* format string which that function parses.</p>
|
|
171
|
+
* <p>This object is automatically populated with date parsing functions as
|
|
172
|
+
* date formats are requested for Ext standard formatting strings.</p>
|
|
173
|
+
* <p>Custom parsing functions may be inserted into this object, keyed by a name which from then on
|
|
174
|
+
* may be used as a format string to {@link #parseDate}.<p>
|
|
175
|
+
* <p>Example:</p><pre><code>
|
|
176
|
+
Date.parseFunctions['x-date-format'] = myDateParser;
|
|
177
|
+
</code></pre>
|
|
178
|
+
* <p>A parsing function should return a Date object, and is passed the following parameters:<div class="mdetail-params"><ul>
|
|
179
|
+
* <li><code>date</code> : String<div class="sub-desc">The date string to parse.</div></li>
|
|
180
|
+
* <li><code>strict</code> : Boolean<div class="sub-desc">True to validate date strings while parsing
|
|
181
|
+
* (i.e. prevent javascript Date "rollover") (The default must be false).
|
|
182
|
+
* Invalid date strings should return null when parsed.</div></li>
|
|
183
|
+
* </ul></div></p>
|
|
184
|
+
* <p>To enable Dates to also be <i>formatted</i> according to that format, a corresponding
|
|
185
|
+
* formatting function must be placed into the {@link #formatFunctions} property.
|
|
186
|
+
* @property parseFunctions
|
|
187
|
+
* @static
|
|
188
|
+
* @type Object
|
|
189
|
+
*/
|
|
190
|
+
parseFunctions: {
|
|
191
|
+
"M$": function(input, strict) {
|
|
192
|
+
// note: the timezone offset is ignored since the M$ Ajax server sends
|
|
193
|
+
// a UTC milliseconds-since-Unix-epoch value (negative values are allowed)
|
|
194
|
+
var re = new RegExp('\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/');
|
|
195
|
+
var r = (input || '').match(re);
|
|
196
|
+
return r? new Date(((r[1] || '') + r[2]) * 1) : null;
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
parseRegexes: [],
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* <p>An object hash in which each property is a date formatting function. The property name is the
|
|
203
|
+
* format string which corresponds to the produced formatted date string.</p>
|
|
204
|
+
* <p>This object is automatically populated with date formatting functions as
|
|
205
|
+
* date formats are requested for Ext standard formatting strings.</p>
|
|
206
|
+
* <p>Custom formatting functions may be inserted into this object, keyed by a name which from then on
|
|
207
|
+
* may be used as a format string to {@link #format}. Example:</p><pre><code>
|
|
208
|
+
Date.formatFunctions['x-date-format'] = myDateFormatter;
|
|
209
|
+
</code></pre>
|
|
210
|
+
* <p>A formatting function should return a string repesentation of the passed Date object:<div class="mdetail-params"><ul>
|
|
211
|
+
* <li><code>date</code> : Date<div class="sub-desc">The Date to format.</div></li>
|
|
212
|
+
* </ul></div></p>
|
|
213
|
+
* <p>To enable date strings to also be <i>parsed</i> according to that format, a corresponding
|
|
214
|
+
* parsing function must be placed into the {@link #parseFunctions} property.
|
|
215
|
+
* @property formatFunctions
|
|
216
|
+
* @static
|
|
217
|
+
* @type Object
|
|
218
|
+
*/
|
|
219
|
+
formatFunctions: {
|
|
220
|
+
"M$": function() {
|
|
221
|
+
// UTC milliseconds since Unix epoch (M$-AJAX serialized date format (MRSF))
|
|
222
|
+
return '\\/Date(' + this.getTime() + ')\\/';
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
y2kYear : 50,
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Date interval constant
|
|
230
|
+
* @static
|
|
231
|
+
* @type String
|
|
232
|
+
*/
|
|
233
|
+
MILLI : "ms",
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Date interval constant
|
|
237
|
+
* @static
|
|
238
|
+
* @type String
|
|
239
|
+
*/
|
|
240
|
+
SECOND : "s",
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Date interval constant
|
|
244
|
+
* @static
|
|
245
|
+
* @type String
|
|
246
|
+
*/
|
|
247
|
+
MINUTE : "mi",
|
|
248
|
+
|
|
249
|
+
/** Date interval constant
|
|
250
|
+
* @static
|
|
251
|
+
* @type String
|
|
252
|
+
*/
|
|
253
|
+
HOUR : "h",
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Date interval constant
|
|
257
|
+
* @static
|
|
258
|
+
* @type String
|
|
259
|
+
*/
|
|
260
|
+
DAY : "d",
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Date interval constant
|
|
264
|
+
* @static
|
|
265
|
+
* @type String
|
|
266
|
+
*/
|
|
267
|
+
MONTH : "mo",
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Date interval constant
|
|
271
|
+
* @static
|
|
272
|
+
* @type String
|
|
273
|
+
*/
|
|
274
|
+
YEAR : "y",
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* <p>An object hash containing default date values used during date parsing.</p>
|
|
278
|
+
* <p>The following properties are available:<div class="mdetail-params"><ul>
|
|
279
|
+
* <li><code>y</code> : Number<div class="sub-desc">The default year value. (defaults to undefined)</div></li>
|
|
280
|
+
* <li><code>m</code> : Number<div class="sub-desc">The default 1-based month value. (defaults to undefined)</div></li>
|
|
281
|
+
* <li><code>d</code> : Number<div class="sub-desc">The default day value. (defaults to undefined)</div></li>
|
|
282
|
+
* <li><code>h</code> : Number<div class="sub-desc">The default hour value. (defaults to undefined)</div></li>
|
|
283
|
+
* <li><code>i</code> : Number<div class="sub-desc">The default minute value. (defaults to undefined)</div></li>
|
|
284
|
+
* <li><code>s</code> : Number<div class="sub-desc">The default second value. (defaults to undefined)</div></li>
|
|
285
|
+
* <li><code>ms</code> : Number<div class="sub-desc">The default millisecond value. (defaults to undefined)</div></li>
|
|
286
|
+
* </ul></div></p>
|
|
287
|
+
* <p>Override these properties to customize the default date values used by the {@link #parseDate} method.</p>
|
|
288
|
+
* <p><b>Note: In countries which experience Daylight Saving Time (i.e. DST), the <tt>h</tt>, <tt>i</tt>, <tt>s</tt>
|
|
289
|
+
* and <tt>ms</tt> properties may coincide with the exact time in which DST takes effect.
|
|
290
|
+
* It is the responsiblity of the developer to account for this.</b></p>
|
|
291
|
+
* Example Usage:
|
|
292
|
+
* <pre><code>
|
|
293
|
+
// set default day value to the first day of the month
|
|
294
|
+
Date.defaults.d = 1;
|
|
295
|
+
|
|
296
|
+
// parse a February date string containing only year and month values.
|
|
297
|
+
// setting the default day value to 1 prevents weird date rollover issues
|
|
298
|
+
// when attempting to parse the following date string on, for example, March 31st 2009.
|
|
299
|
+
Date.parseDate('2009-02', 'Y-m'); // returns a Date object representing February 1st 2009
|
|
300
|
+
</code></pre>
|
|
301
|
+
* @property defaults
|
|
302
|
+
* @static
|
|
303
|
+
* @type Object
|
|
304
|
+
*/
|
|
305
|
+
defaults: {},
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* An array of textual day names.
|
|
309
|
+
* Override these values for international dates.
|
|
310
|
+
* Example:
|
|
311
|
+
* <pre><code>
|
|
312
|
+
Date.dayNames = [
|
|
313
|
+
'SundayInYourLang',
|
|
314
|
+
'MondayInYourLang',
|
|
315
|
+
...
|
|
316
|
+
];
|
|
317
|
+
</code></pre>
|
|
318
|
+
* @type Array
|
|
319
|
+
* @static
|
|
320
|
+
*/
|
|
321
|
+
dayNames : [
|
|
322
|
+
"Sunday",
|
|
323
|
+
"Monday",
|
|
324
|
+
"Tuesday",
|
|
325
|
+
"Wednesday",
|
|
326
|
+
"Thursday",
|
|
327
|
+
"Friday",
|
|
328
|
+
"Saturday"
|
|
329
|
+
],
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* An array of textual month names.
|
|
333
|
+
* Override these values for international dates.
|
|
334
|
+
* Example:
|
|
335
|
+
* <pre><code>
|
|
336
|
+
Date.monthNames = [
|
|
337
|
+
'JanInYourLang',
|
|
338
|
+
'FebInYourLang',
|
|
339
|
+
...
|
|
340
|
+
];
|
|
341
|
+
</code></pre>
|
|
342
|
+
* @type Array
|
|
343
|
+
* @static
|
|
344
|
+
*/
|
|
345
|
+
monthNames : [
|
|
346
|
+
"January",
|
|
347
|
+
"February",
|
|
348
|
+
"March",
|
|
349
|
+
"April",
|
|
350
|
+
"May",
|
|
351
|
+
"June",
|
|
352
|
+
"July",
|
|
353
|
+
"August",
|
|
354
|
+
"September",
|
|
355
|
+
"October",
|
|
356
|
+
"November",
|
|
357
|
+
"December"
|
|
358
|
+
],
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* An object hash of zero-based javascript month numbers (with short month names as keys. note: keys are case-sensitive).
|
|
362
|
+
* Override these values for international dates.
|
|
363
|
+
* Example:
|
|
364
|
+
* <pre><code>
|
|
365
|
+
Date.monthNumbers = {
|
|
366
|
+
'ShortJanNameInYourLang':0,
|
|
367
|
+
'ShortFebNameInYourLang':1,
|
|
368
|
+
...
|
|
369
|
+
};
|
|
370
|
+
</code></pre>
|
|
371
|
+
* @type Object
|
|
372
|
+
* @static
|
|
373
|
+
*/
|
|
374
|
+
monthNumbers : {
|
|
375
|
+
Jan:0,
|
|
376
|
+
Feb:1,
|
|
377
|
+
Mar:2,
|
|
378
|
+
Apr:3,
|
|
379
|
+
May:4,
|
|
380
|
+
Jun:5,
|
|
381
|
+
Jul:6,
|
|
382
|
+
Aug:7,
|
|
383
|
+
Sep:8,
|
|
384
|
+
Oct:9,
|
|
385
|
+
Nov:10,
|
|
386
|
+
Dec:11
|
|
387
|
+
},
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Get the short month name for the given month number.
|
|
391
|
+
* Override this function for international dates.
|
|
392
|
+
* @param {Number} month A zero-based javascript month number.
|
|
393
|
+
* @return {String} The short month name.
|
|
394
|
+
* @static
|
|
395
|
+
*/
|
|
396
|
+
getShortMonthName : function(month) {
|
|
397
|
+
return Date.monthNames[month].substring(0, 3);
|
|
398
|
+
},
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Get the short day name for the given day number.
|
|
402
|
+
* Override this function for international dates.
|
|
403
|
+
* @param {Number} day A zero-based javascript day number.
|
|
404
|
+
* @return {String} The short day name.
|
|
405
|
+
* @static
|
|
406
|
+
*/
|
|
407
|
+
getShortDayName : function(day) {
|
|
408
|
+
return Date.dayNames[day].substring(0, 3);
|
|
409
|
+
},
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Get the zero-based javascript month number for the given short/full month name.
|
|
413
|
+
* Override this function for international dates.
|
|
414
|
+
* @param {String} name The short/full month name.
|
|
415
|
+
* @return {Number} The zero-based javascript month number.
|
|
416
|
+
* @static
|
|
417
|
+
*/
|
|
418
|
+
getMonthNumber : function(name) {
|
|
419
|
+
// handle camel casing for english month names (since the keys for the Date.monthNumbers hash are case sensitive)
|
|
420
|
+
return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
|
|
421
|
+
},
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* The base format-code to formatting-function hashmap used by the {@link #format} method.
|
|
425
|
+
* Formatting functions are strings (or functions which return strings) which
|
|
426
|
+
* will return the appropriate value when evaluated in the context of the Date object
|
|
427
|
+
* from which the {@link #format} method is called.
|
|
428
|
+
* Add to / override these mappings for custom date formatting.
|
|
429
|
+
* Note: Date.format() treats characters as literals if an appropriate mapping cannot be found.
|
|
430
|
+
* Example:
|
|
431
|
+
* <pre><code>
|
|
432
|
+
Date.formatCodes.x = "String.leftPad(this.getDate(), 2, '0')";
|
|
433
|
+
(new Date()).format("X"); // returns the current day of the month
|
|
434
|
+
</code></pre>
|
|
435
|
+
* @type Object
|
|
436
|
+
* @static
|
|
437
|
+
*/
|
|
438
|
+
formatCodes : {
|
|
439
|
+
d: "String.leftPad(this.getDate(), 2, '0')",
|
|
440
|
+
D: "Date.getShortDayName(this.getDay())", // get localised short day name
|
|
441
|
+
j: "this.getDate()",
|
|
442
|
+
l: "Date.dayNames[this.getDay()]",
|
|
443
|
+
N: "(this.getDay() ? this.getDay() : 7)",
|
|
444
|
+
S: "this.getSuffix()",
|
|
445
|
+
w: "this.getDay()",
|
|
446
|
+
z: "this.getDayOfYear()",
|
|
447
|
+
W: "String.leftPad(this.getWeekOfYear(), 2, '0')",
|
|
448
|
+
F: "Date.monthNames[this.getMonth()]",
|
|
449
|
+
m: "String.leftPad(this.getMonth() + 1, 2, '0')",
|
|
450
|
+
M: "Date.getShortMonthName(this.getMonth())", // get localised short month name
|
|
451
|
+
n: "(this.getMonth() + 1)",
|
|
452
|
+
t: "this.getDaysInMonth()",
|
|
453
|
+
L: "(this.isLeapYear() ? 1 : 0)",
|
|
454
|
+
o: "(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",
|
|
455
|
+
Y: "this.getFullYear()",
|
|
456
|
+
y: "('' + this.getFullYear()).substring(2, 4)",
|
|
457
|
+
a: "(this.getHours() < 12 ? 'am' : 'pm')",
|
|
458
|
+
A: "(this.getHours() < 12 ? 'AM' : 'PM')",
|
|
459
|
+
g: "((this.getHours() % 12) ? this.getHours() % 12 : 12)",
|
|
460
|
+
G: "this.getHours()",
|
|
461
|
+
h: "String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",
|
|
462
|
+
H: "String.leftPad(this.getHours(), 2, '0')",
|
|
463
|
+
i: "String.leftPad(this.getMinutes(), 2, '0')",
|
|
464
|
+
s: "String.leftPad(this.getSeconds(), 2, '0')",
|
|
465
|
+
u: "String.leftPad(this.getMilliseconds(), 3, '0')",
|
|
466
|
+
O: "this.getGMTOffset()",
|
|
467
|
+
P: "this.getGMTOffset(true)",
|
|
468
|
+
T: "this.getTimezone()",
|
|
469
|
+
Z: "(this.getTimezoneOffset() * -60)",
|
|
470
|
+
|
|
471
|
+
c: function() { // ISO-8601 -- GMT format
|
|
472
|
+
for (var c = "Y-m-dTH:i:sP", code = [], i = 0, l = c.length; i < l; ++i) {
|
|
473
|
+
var e = c.charAt(i);
|
|
474
|
+
code.push(e == "T" ? "'T'" : Date.getFormatCode(e)); // treat T as a character literal
|
|
475
|
+
}
|
|
476
|
+
return code.join(" + ");
|
|
477
|
+
},
|
|
478
|
+
/*
|
|
479
|
+
c: function() { // ISO-8601 -- UTC format
|
|
480
|
+
return [
|
|
481
|
+
"this.getUTCFullYear()", "'-'",
|
|
482
|
+
"String.leftPad(this.getUTCMonth() + 1, 2, '0')", "'-'",
|
|
483
|
+
"String.leftPad(this.getUTCDate(), 2, '0')",
|
|
484
|
+
"'T'",
|
|
485
|
+
"String.leftPad(this.getUTCHours(), 2, '0')", "':'",
|
|
486
|
+
"String.leftPad(this.getUTCMinutes(), 2, '0')", "':'",
|
|
487
|
+
"String.leftPad(this.getUTCSeconds(), 2, '0')",
|
|
488
|
+
"'Z'"
|
|
489
|
+
].join(" + ");
|
|
490
|
+
},
|
|
491
|
+
*/
|
|
492
|
+
|
|
493
|
+
U: "Math.round(this.getTime() / 1000)"
|
|
494
|
+
},
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Checks if the passed Date parameters will cause a javascript Date "rollover".
|
|
498
|
+
* @param {Number} year 4-digit year
|
|
499
|
+
* @param {Number} month 1-based month-of-year
|
|
500
|
+
* @param {Number} day Day of month
|
|
501
|
+
* @param {Number} hour (optional) Hour
|
|
502
|
+
* @param {Number} minute (optional) Minute
|
|
503
|
+
* @param {Number} second (optional) Second
|
|
504
|
+
* @param {Number} millisecond (optional) Millisecond
|
|
505
|
+
* @return {Boolean} true if the passed parameters do not cause a Date "rollover", false otherwise.
|
|
506
|
+
* @static
|
|
507
|
+
*/
|
|
508
|
+
isValid : function(y, m, d, h, i, s, ms) {
|
|
509
|
+
// setup defaults
|
|
510
|
+
h = h || 0;
|
|
511
|
+
i = i || 0;
|
|
512
|
+
s = s || 0;
|
|
513
|
+
ms = ms || 0;
|
|
514
|
+
|
|
515
|
+
var dt = new Date(y, m - 1, d, h, i, s, ms);
|
|
516
|
+
|
|
517
|
+
return y == dt.getFullYear() &&
|
|
518
|
+
m == dt.getMonth() + 1 &&
|
|
519
|
+
d == dt.getDate() &&
|
|
520
|
+
h == dt.getHours() &&
|
|
521
|
+
i == dt.getMinutes() &&
|
|
522
|
+
s == dt.getSeconds() &&
|
|
523
|
+
ms == dt.getMilliseconds();
|
|
524
|
+
},
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Parses the passed string using the specified date format.
|
|
528
|
+
* Note that this function expects normal calendar dates, meaning that months are 1-based (i.e. 1 = January).
|
|
529
|
+
* The {@link #defaults} hash will be used for any date value (i.e. year, month, day, hour, minute, second or millisecond)
|
|
530
|
+
* which cannot be found in the passed string. If a corresponding default date value has not been specified in the {@link #defaults} hash,
|
|
531
|
+
* the current date's year, month, day or DST-adjusted zero-hour time value will be used instead.
|
|
532
|
+
* Keep in mind that the input date string must precisely match the specified format string
|
|
533
|
+
* in order for the parse operation to be successful (failed parse operations return a null value).
|
|
534
|
+
* <p>Example:</p><pre><code>
|
|
535
|
+
//dt = Fri May 25 2007 (current date)
|
|
536
|
+
var dt = new Date();
|
|
537
|
+
|
|
538
|
+
//dt = Thu May 25 2006 (today's month/day in 2006)
|
|
539
|
+
dt = Date.parseDate("2006", "Y");
|
|
540
|
+
|
|
541
|
+
//dt = Sun Jan 15 2006 (all date parts specified)
|
|
542
|
+
dt = Date.parseDate("2006-01-15", "Y-m-d");
|
|
543
|
+
|
|
544
|
+
//dt = Sun Jan 15 2006 15:20:01
|
|
545
|
+
dt = Date.parseDate("2006-01-15 3:20:01 PM", "Y-m-d g:i:s A");
|
|
546
|
+
|
|
547
|
+
// attempt to parse Sun Feb 29 2006 03:20:01 in strict mode
|
|
548
|
+
dt = Date.parseDate("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null
|
|
549
|
+
</code></pre>
|
|
550
|
+
* @param {String} input The raw date string.
|
|
551
|
+
* @param {String} format The expected date string format.
|
|
552
|
+
* @param {Boolean} strict (optional) True to validate date strings while parsing (i.e. prevents javascript Date "rollover")
|
|
553
|
+
(defaults to false). Invalid date strings will return null when parsed.
|
|
554
|
+
* @return {Date} The parsed Date.
|
|
555
|
+
* @static
|
|
556
|
+
*/
|
|
557
|
+
parseDate : function(input, format, strict) {
|
|
558
|
+
var p = Date.parseFunctions;
|
|
559
|
+
if (p[format] == null) {
|
|
560
|
+
Date.createParser(format);
|
|
561
|
+
}
|
|
562
|
+
return p[format](input, Ext.isDefined(strict) ? strict : Date.useStrict);
|
|
563
|
+
},
|
|
564
|
+
|
|
565
|
+
// private
|
|
566
|
+
getFormatCode : function(character) {
|
|
567
|
+
var f = Date.formatCodes[character];
|
|
568
|
+
|
|
569
|
+
if (f) {
|
|
570
|
+
f = typeof f == 'function'? f() : f;
|
|
571
|
+
Date.formatCodes[character] = f; // reassign function result to prevent repeated execution
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
// note: unknown characters are treated as literals
|
|
575
|
+
return f || ("'" + String.escape(character) + "'");
|
|
576
|
+
},
|
|
577
|
+
|
|
578
|
+
// private
|
|
579
|
+
createFormat : function(format) {
|
|
580
|
+
var code = [],
|
|
581
|
+
special = false,
|
|
582
|
+
ch = '';
|
|
583
|
+
|
|
584
|
+
for (var i = 0; i < format.length; ++i) {
|
|
585
|
+
ch = format.charAt(i);
|
|
586
|
+
if (!special && ch == "\\") {
|
|
587
|
+
special = true;
|
|
588
|
+
} else if (special) {
|
|
589
|
+
special = false;
|
|
590
|
+
code.push("'" + String.escape(ch) + "'");
|
|
591
|
+
} else {
|
|
592
|
+
code.push(Date.getFormatCode(ch))
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
Date.formatFunctions[format] = new Function("return " + code.join('+'));
|
|
596
|
+
},
|
|
597
|
+
|
|
598
|
+
// private
|
|
599
|
+
createParser : function() {
|
|
600
|
+
var code = [
|
|
601
|
+
"var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,",
|
|
602
|
+
"def = Date.defaults,",
|
|
603
|
+
"results = String(input).match(Date.parseRegexes[{0}]);", // either null, or an array of matched strings
|
|
604
|
+
|
|
605
|
+
"if(results){",
|
|
606
|
+
"{1}",
|
|
607
|
+
|
|
608
|
+
"if(u != null){", // i.e. unix time is defined
|
|
609
|
+
"v = new Date(u * 1000);", // give top priority to UNIX time
|
|
610
|
+
"}else{",
|
|
611
|
+
// create Date object representing midnight of the current day;
|
|
612
|
+
// this will provide us with our date defaults
|
|
613
|
+
// (note: clearTime() handles Daylight Saving Time automatically)
|
|
614
|
+
"dt = (new Date()).clearTime();",
|
|
615
|
+
|
|
616
|
+
// date calculations (note: these calculations create a dependency on Ext.num())
|
|
617
|
+
"y = y >= 0? y : Ext.num(def.y, dt.getFullYear());",
|
|
618
|
+
"m = m >= 0? m : Ext.num(def.m - 1, dt.getMonth());",
|
|
619
|
+
"d = d >= 0? d : Ext.num(def.d, dt.getDate());",
|
|
620
|
+
|
|
621
|
+
// time calculations (note: these calculations create a dependency on Ext.num())
|
|
622
|
+
"h = h || Ext.num(def.h, dt.getHours());",
|
|
623
|
+
"i = i || Ext.num(def.i, dt.getMinutes());",
|
|
624
|
+
"s = s || Ext.num(def.s, dt.getSeconds());",
|
|
625
|
+
"ms = ms || Ext.num(def.ms, dt.getMilliseconds());",
|
|
626
|
+
|
|
627
|
+
"if(z >= 0 && y >= 0){",
|
|
628
|
+
// both the year and zero-based day of year are defined and >= 0.
|
|
629
|
+
// these 2 values alone provide sufficient info to create a full date object
|
|
630
|
+
|
|
631
|
+
// create Date object representing January 1st for the given year
|
|
632
|
+
"v = new Date(y, 0, 1, h, i, s, ms);",
|
|
633
|
+
|
|
634
|
+
// then add day of year, checking for Date "rollover" if necessary
|
|
635
|
+
"v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);",
|
|
636
|
+
"}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){", // check for Date "rollover"
|
|
637
|
+
"v = null;", // invalid date, so return null
|
|
638
|
+
"}else{",
|
|
639
|
+
// plain old Date object
|
|
640
|
+
"v = new Date(y, m, d, h, i, s, ms);",
|
|
641
|
+
"}",
|
|
642
|
+
"}",
|
|
643
|
+
"}",
|
|
644
|
+
|
|
645
|
+
"if(v){",
|
|
646
|
+
// favour UTC offset over GMT offset
|
|
647
|
+
"if(zz != null){",
|
|
648
|
+
// reset to UTC, then add offset
|
|
649
|
+
"v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);",
|
|
650
|
+
"}else if(o){",
|
|
651
|
+
// reset to GMT, then add offset
|
|
652
|
+
"v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));",
|
|
653
|
+
"}",
|
|
654
|
+
"}",
|
|
655
|
+
|
|
656
|
+
"return v;"
|
|
657
|
+
].join('\n');
|
|
658
|
+
|
|
659
|
+
return function(format) {
|
|
660
|
+
var regexNum = Date.parseRegexes.length,
|
|
661
|
+
currentGroup = 1,
|
|
662
|
+
calc = [],
|
|
663
|
+
regex = [],
|
|
664
|
+
special = false,
|
|
665
|
+
ch = "";
|
|
666
|
+
|
|
667
|
+
for (var i = 0; i < format.length; ++i) {
|
|
668
|
+
ch = format.charAt(i);
|
|
669
|
+
if (!special && ch == "\\") {
|
|
670
|
+
special = true;
|
|
671
|
+
} else if (special) {
|
|
672
|
+
special = false;
|
|
673
|
+
regex.push(String.escape(ch));
|
|
674
|
+
} else {
|
|
675
|
+
var obj = $f(ch, currentGroup);
|
|
676
|
+
currentGroup += obj.g;
|
|
677
|
+
regex.push(obj.s);
|
|
678
|
+
if (obj.g && obj.c) {
|
|
679
|
+
calc.push(obj.c);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
Date.parseRegexes[regexNum] = new RegExp("^" + regex.join('') + "$", "i");
|
|
685
|
+
Date.parseFunctions[format] = new Function("input", "strict", xf(code, regexNum, calc.join('')));
|
|
686
|
+
}
|
|
687
|
+
}(),
|
|
688
|
+
|
|
689
|
+
// private
|
|
690
|
+
parseCodes : {
|
|
691
|
+
/*
|
|
692
|
+
* Notes:
|
|
693
|
+
* g = {Number} calculation group (0 or 1. only group 1 contributes to date calculations.)
|
|
694
|
+
* c = {String} calculation method (required for group 1. null for group 0. {0} = currentGroup - position in regex result array)
|
|
695
|
+
* s = {String} regex pattern. all matches are stored in results[], and are accessible by the calculation mapped to 'c'
|
|
696
|
+
*/
|
|
697
|
+
d: {
|
|
698
|
+
g:1,
|
|
699
|
+
c:"d = parseInt(results[{0}], 10);\n",
|
|
700
|
+
s:"(\\d{2})" // day of month with leading zeroes (01 - 31)
|
|
701
|
+
},
|
|
702
|
+
j: {
|
|
703
|
+
g:1,
|
|
704
|
+
c:"d = parseInt(results[{0}], 10);\n",
|
|
705
|
+
s:"(\\d{1,2})" // day of month without leading zeroes (1 - 31)
|
|
706
|
+
},
|
|
707
|
+
D: function() {
|
|
708
|
+
for (var a = [], i = 0; i < 7; a.push(Date.getShortDayName(i)), ++i); // get localised short day names
|
|
709
|
+
return {
|
|
710
|
+
g:0,
|
|
711
|
+
c:null,
|
|
712
|
+
s:"(?:" + a.join("|") +")"
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
l: function() {
|
|
716
|
+
return {
|
|
717
|
+
g:0,
|
|
718
|
+
c:null,
|
|
719
|
+
s:"(?:" + Date.dayNames.join("|") + ")"
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
N: {
|
|
723
|
+
g:0,
|
|
724
|
+
c:null,
|
|
725
|
+
s:"[1-7]" // ISO-8601 day number (1 (monday) - 7 (sunday))
|
|
726
|
+
},
|
|
727
|
+
S: {
|
|
728
|
+
g:0,
|
|
729
|
+
c:null,
|
|
730
|
+
s:"(?:st|nd|rd|th)"
|
|
731
|
+
},
|
|
732
|
+
w: {
|
|
733
|
+
g:0,
|
|
734
|
+
c:null,
|
|
735
|
+
s:"[0-6]" // javascript day number (0 (sunday) - 6 (saturday))
|
|
736
|
+
},
|
|
737
|
+
z: {
|
|
738
|
+
g:1,
|
|
739
|
+
c:"z = parseInt(results[{0}], 10);\n",
|
|
740
|
+
s:"(\\d{1,3})" // day of the year (0 - 364 (365 in leap years))
|
|
741
|
+
},
|
|
742
|
+
W: {
|
|
743
|
+
g:0,
|
|
744
|
+
c:null,
|
|
745
|
+
s:"(?:\\d{2})" // ISO-8601 week number (with leading zero)
|
|
746
|
+
},
|
|
747
|
+
F: function() {
|
|
748
|
+
return {
|
|
749
|
+
g:1,
|
|
750
|
+
c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n", // get localised month number
|
|
751
|
+
s:"(" + Date.monthNames.join("|") + ")"
|
|
752
|
+
}
|
|
753
|
+
},
|
|
754
|
+
M: function() {
|
|
755
|
+
for (var a = [], i = 0; i < 12; a.push(Date.getShortMonthName(i)), ++i); // get localised short month names
|
|
756
|
+
return Ext.applyIf({
|
|
757
|
+
s:"(" + a.join("|") + ")"
|
|
758
|
+
}, $f("F"));
|
|
759
|
+
},
|
|
760
|
+
m: {
|
|
761
|
+
g:1,
|
|
762
|
+
c:"m = parseInt(results[{0}], 10) - 1;\n",
|
|
763
|
+
s:"(\\d{2})" // month number with leading zeros (01 - 12)
|
|
764
|
+
},
|
|
765
|
+
n: {
|
|
766
|
+
g:1,
|
|
767
|
+
c:"m = parseInt(results[{0}], 10) - 1;\n",
|
|
768
|
+
s:"(\\d{1,2})" // month number without leading zeros (1 - 12)
|
|
769
|
+
},
|
|
770
|
+
t: {
|
|
771
|
+
g:0,
|
|
772
|
+
c:null,
|
|
773
|
+
s:"(?:\\d{2})" // no. of days in the month (28 - 31)
|
|
774
|
+
},
|
|
775
|
+
L: {
|
|
776
|
+
g:0,
|
|
777
|
+
c:null,
|
|
778
|
+
s:"(?:1|0)"
|
|
779
|
+
},
|
|
780
|
+
o: function() {
|
|
781
|
+
return $f("Y");
|
|
782
|
+
},
|
|
783
|
+
Y: {
|
|
784
|
+
g:1,
|
|
785
|
+
c:"y = parseInt(results[{0}], 10);\n",
|
|
786
|
+
s:"(\\d{4})" // 4-digit year
|
|
787
|
+
},
|
|
788
|
+
y: {
|
|
789
|
+
g:1,
|
|
790
|
+
c:"var ty = parseInt(results[{0}], 10);\n"
|
|
791
|
+
+ "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n", // 2-digit year
|
|
792
|
+
s:"(\\d{1,2})"
|
|
793
|
+
},
|
|
794
|
+
a: {
|
|
795
|
+
g:1,
|
|
796
|
+
c:"if (results[{0}] == 'am') {\n"
|
|
797
|
+
+ "if (h == 12) { h = 0; }\n"
|
|
798
|
+
+ "} else { if (h < 12) { h += 12; }}",
|
|
799
|
+
s:"(am|pm)"
|
|
800
|
+
},
|
|
801
|
+
A: {
|
|
802
|
+
g:1,
|
|
803
|
+
c:"if (results[{0}] == 'AM') {\n"
|
|
804
|
+
+ "if (h == 12) { h = 0; }\n"
|
|
805
|
+
+ "} else { if (h < 12) { h += 12; }}",
|
|
806
|
+
s:"(AM|PM)"
|
|
807
|
+
},
|
|
808
|
+
g: function() {
|
|
809
|
+
return $f("G");
|
|
810
|
+
},
|
|
811
|
+
G: {
|
|
812
|
+
g:1,
|
|
813
|
+
c:"h = parseInt(results[{0}], 10);\n",
|
|
814
|
+
s:"(\\d{1,2})" // 24-hr format of an hour without leading zeroes (0 - 23)
|
|
815
|
+
},
|
|
816
|
+
h: function() {
|
|
817
|
+
return $f("H");
|
|
818
|
+
},
|
|
819
|
+
H: {
|
|
820
|
+
g:1,
|
|
821
|
+
c:"h = parseInt(results[{0}], 10);\n",
|
|
822
|
+
s:"(\\d{2})" // 24-hr format of an hour with leading zeroes (00 - 23)
|
|
823
|
+
},
|
|
824
|
+
i: {
|
|
825
|
+
g:1,
|
|
826
|
+
c:"i = parseInt(results[{0}], 10);\n",
|
|
827
|
+
s:"(\\d{2})" // minutes with leading zeros (00 - 59)
|
|
828
|
+
},
|
|
829
|
+
s: {
|
|
830
|
+
g:1,
|
|
831
|
+
c:"s = parseInt(results[{0}], 10);\n",
|
|
832
|
+
s:"(\\d{2})" // seconds with leading zeros (00 - 59)
|
|
833
|
+
},
|
|
834
|
+
u: {
|
|
835
|
+
g:1,
|
|
836
|
+
c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",
|
|
837
|
+
s:"(\\d+)" // decimal fraction of a second (minimum = 1 digit, maximum = unlimited)
|
|
838
|
+
},
|
|
839
|
+
O: {
|
|
840
|
+
g:1,
|
|
841
|
+
c:[
|
|
842
|
+
"o = results[{0}];",
|
|
843
|
+
"var sn = o.substring(0,1),", // get + / - sign
|
|
844
|
+
"hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),", // get hours (performs minutes-to-hour conversion also, just in case)
|
|
845
|
+
"mn = o.substring(3,5) % 60;", // get minutes
|
|
846
|
+
"o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n" // -12hrs <= GMT offset <= 14hrs
|
|
847
|
+
].join("\n"),
|
|
848
|
+
s: "([+\-]\\d{4})" // GMT offset in hrs and mins
|
|
849
|
+
},
|
|
850
|
+
P: {
|
|
851
|
+
g:1,
|
|
852
|
+
c:[
|
|
853
|
+
"o = results[{0}];",
|
|
854
|
+
"var sn = o.substring(0,1),", // get + / - sign
|
|
855
|
+
"hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),", // get hours (performs minutes-to-hour conversion also, just in case)
|
|
856
|
+
"mn = o.substring(4,6) % 60;", // get minutes
|
|
857
|
+
"o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n" // -12hrs <= GMT offset <= 14hrs
|
|
858
|
+
].join("\n"),
|
|
859
|
+
s: "([+\-]\\d{2}:\\d{2})" // GMT offset in hrs and mins (with colon separator)
|
|
860
|
+
},
|
|
861
|
+
T: {
|
|
862
|
+
g:0,
|
|
863
|
+
c:null,
|
|
864
|
+
s:"[A-Z]{1,4}" // timezone abbrev. may be between 1 - 4 chars
|
|
865
|
+
},
|
|
866
|
+
Z: {
|
|
867
|
+
g:1,
|
|
868
|
+
c:"zz = results[{0}] * 1;\n" // -43200 <= UTC offset <= 50400
|
|
869
|
+
+ "zz = (-43200 <= zz && zz <= 50400)? zz : null;\n",
|
|
870
|
+
s:"([+\-]?\\d{1,5})" // leading '+' sign is optional for UTC offset
|
|
871
|
+
},
|
|
872
|
+
c: function() {
|
|
873
|
+
var calc = [],
|
|
874
|
+
arr = [
|
|
875
|
+
$f("Y", 1), // year
|
|
876
|
+
$f("m", 2), // month
|
|
877
|
+
$f("d", 3), // day
|
|
878
|
+
$f("h", 4), // hour
|
|
879
|
+
$f("i", 5), // minute
|
|
880
|
+
$f("s", 6), // second
|
|
881
|
+
{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"}, // decimal fraction of a second (minimum = 1 digit, maximum = unlimited)
|
|
882
|
+
{c:[ // allow either "Z" (i.e. UTC) or "-0530" or "+08:00" (i.e. UTC offset) timezone delimiters. assumes local timezone if no timezone is specified
|
|
883
|
+
"if(results[8]) {", // timezone specified
|
|
884
|
+
"if(results[8] == 'Z'){",
|
|
885
|
+
"zz = 0;", // UTC
|
|
886
|
+
"}else if (results[8].indexOf(':') > -1){",
|
|
887
|
+
$f("P", 8).c, // timezone offset with colon separator
|
|
888
|
+
"}else{",
|
|
889
|
+
$f("O", 8).c, // timezone offset without colon separator
|
|
890
|
+
"}",
|
|
891
|
+
"}"
|
|
892
|
+
].join('\n')}
|
|
893
|
+
];
|
|
894
|
+
|
|
895
|
+
for (var i = 0, l = arr.length; i < l; ++i) {
|
|
896
|
+
calc.push(arr[i].c);
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
return {
|
|
900
|
+
g:1,
|
|
901
|
+
c:calc.join(""),
|
|
902
|
+
s:[
|
|
903
|
+
arr[0].s, // year (required)
|
|
904
|
+
"(?:", "-", arr[1].s, // month (optional)
|
|
905
|
+
"(?:", "-", arr[2].s, // day (optional)
|
|
906
|
+
"(?:",
|
|
907
|
+
"(?:T| )?", // time delimiter -- either a "T" or a single blank space
|
|
908
|
+
arr[3].s, ":", arr[4].s, // hour AND minute, delimited by a single colon (optional). MUST be preceded by either a "T" or a single blank space
|
|
909
|
+
"(?::", arr[5].s, ")?", // seconds (optional)
|
|
910
|
+
"(?:(?:\\.|,)(\\d+))?", // decimal fraction of a second (e.g. ",12345" or ".98765") (optional)
|
|
911
|
+
"(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?", // "Z" (UTC) or "-0530" (UTC offset without colon delimiter) or "+08:00" (UTC offset with colon delimiter) (optional)
|
|
912
|
+
")?",
|
|
913
|
+
")?",
|
|
914
|
+
")?"
|
|
915
|
+
].join("")
|
|
916
|
+
}
|
|
917
|
+
},
|
|
918
|
+
U: {
|
|
919
|
+
g:1,
|
|
920
|
+
c:"u = parseInt(results[{0}], 10);\n",
|
|
921
|
+
s:"(-?\\d+)" // leading minus sign indicates seconds before UNIX epoch
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
});
|
|
925
|
+
|
|
926
|
+
}());
|
|
927
|
+
|
|
928
|
+
Ext.apply(Date.prototype, {
|
|
929
|
+
// private
|
|
930
|
+
dateFormat : function(format) {
|
|
931
|
+
if (Date.formatFunctions[format] == null) {
|
|
932
|
+
Date.createFormat(format);
|
|
933
|
+
}
|
|
934
|
+
return Date.formatFunctions[format].call(this);
|
|
935
|
+
},
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* Get the timezone abbreviation of the current date (equivalent to the format specifier 'T').
|
|
939
|
+
*
|
|
940
|
+
* Note: The date string returned by the javascript Date object's toString() method varies
|
|
941
|
+
* between browsers (e.g. FF vs IE) and system region settings (e.g. IE in Asia vs IE in America).
|
|
942
|
+
* For a given date string e.g. "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)",
|
|
943
|
+
* getTimezone() first tries to get the timezone abbreviation from between a pair of parentheses
|
|
944
|
+
* (which may or may not be present), failing which it proceeds to get the timezone abbreviation
|
|
945
|
+
* from the GMT offset portion of the date string.
|
|
946
|
+
* @return {String} The abbreviated timezone name (e.g. 'CST', 'PDT', 'EDT', 'MPST' ...).
|
|
947
|
+
*/
|
|
948
|
+
getTimezone : function() {
|
|
949
|
+
// the following list shows the differences between date strings from different browsers on a WinXP SP2 machine from an Asian locale:
|
|
950
|
+
//
|
|
951
|
+
// Opera : "Thu, 25 Oct 2007 22:53:45 GMT+0800" -- shortest (weirdest) date string of the lot
|
|
952
|
+
// Safari : "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)" -- value in parentheses always gives the correct timezone (same as FF)
|
|
953
|
+
// FF : "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)" -- value in parentheses always gives the correct timezone
|
|
954
|
+
// IE : "Thu Oct 25 22:54:35 UTC+0800 2007" -- (Asian system setting) look for 3-4 letter timezone abbrev
|
|
955
|
+
// IE : "Thu Oct 25 17:06:37 PDT 2007" -- (American system setting) look for 3-4 letter timezone abbrev
|
|
956
|
+
//
|
|
957
|
+
// this crazy regex attempts to guess the correct timezone abbreviation despite these differences.
|
|
958
|
+
// step 1: (?:\((.*)\) -- find timezone in parentheses
|
|
959
|
+
// step 2: ([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?) -- if nothing was found in step 1, find timezone from timezone offset portion of date string
|
|
960
|
+
// step 3: remove all non uppercase characters found in step 1 and 2
|
|
961
|
+
return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/, "$1$2").replace(/[^A-Z]/g, "");
|
|
962
|
+
},
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* Get the offset from GMT of the current date (equivalent to the format specifier 'O').
|
|
966
|
+
* @param {Boolean} colon (optional) true to separate the hours and minutes with a colon (defaults to false).
|
|
967
|
+
* @return {String} The 4-character offset string prefixed with + or - (e.g. '-0600').
|
|
968
|
+
*/
|
|
969
|
+
getGMTOffset : function(colon) {
|
|
970
|
+
return (this.getTimezoneOffset() > 0 ? "-" : "+")
|
|
971
|
+
+ String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset()) / 60), 2, "0")
|
|
972
|
+
+ (colon ? ":" : "")
|
|
973
|
+
+ String.leftPad(Math.abs(this.getTimezoneOffset() % 60), 2, "0");
|
|
974
|
+
},
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* Get the numeric day number of the year, adjusted for leap year.
|
|
978
|
+
* @return {Number} 0 to 364 (365 in leap years).
|
|
979
|
+
*/
|
|
980
|
+
getDayOfYear: function() {
|
|
981
|
+
var i = 0,
|
|
982
|
+
num = 0,
|
|
983
|
+
d = this.clone(),
|
|
984
|
+
m = this.getMonth();
|
|
985
|
+
|
|
986
|
+
for (i = 0, d.setMonth(0); i < m; d.setMonth(++i)) {
|
|
987
|
+
num += d.getDaysInMonth();
|
|
988
|
+
}
|
|
989
|
+
return num + this.getDate() - 1;
|
|
990
|
+
},
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* Get the numeric ISO-8601 week number of the year.
|
|
994
|
+
* (equivalent to the format specifier 'W', but without a leading zero).
|
|
995
|
+
* @return {Number} 1 to 53
|
|
996
|
+
*/
|
|
997
|
+
getWeekOfYear : function() {
|
|
998
|
+
// adapted from http://www.merlyn.demon.co.uk/weekcalc.htm
|
|
999
|
+
var ms1d = 864e5, // milliseconds in a day
|
|
1000
|
+
ms7d = 7 * ms1d; // milliseconds in a week
|
|
1001
|
+
|
|
1002
|
+
return function() { // return a closure so constants get calculated only once
|
|
1003
|
+
var DC3 = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate() + 3) / ms1d, // an Absolute Day Number
|
|
1004
|
+
AWN = Math.floor(DC3 / 7), // an Absolute Week Number
|
|
1005
|
+
Wyr = new Date(AWN * ms7d).getUTCFullYear();
|
|
1006
|
+
|
|
1007
|
+
return AWN - Math.floor(Date.UTC(Wyr, 0, 7) / ms7d) + 1;
|
|
1008
|
+
}
|
|
1009
|
+
}(),
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* Checks if the current date falls within a leap year.
|
|
1013
|
+
* @return {Boolean} True if the current date falls within a leap year, false otherwise.
|
|
1014
|
+
*/
|
|
1015
|
+
isLeapYear : function() {
|
|
1016
|
+
var year = this.getFullYear();
|
|
1017
|
+
return !!((year & 3) == 0 && (year % 100 || (year % 400 == 0 && year)));
|
|
1018
|
+
},
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* Get the first day of the current month, adjusted for leap year. The returned value
|
|
1022
|
+
* is the numeric day index within the week (0-6) which can be used in conjunction with
|
|
1023
|
+
* the {@link #monthNames} array to retrieve the textual day name.
|
|
1024
|
+
* Example:
|
|
1025
|
+
* <pre><code>
|
|
1026
|
+
var dt = new Date('1/10/2007');
|
|
1027
|
+
document.write(Date.dayNames[dt.getFirstDayOfMonth()]); //output: 'Monday'
|
|
1028
|
+
</code></pre>
|
|
1029
|
+
* @return {Number} The day number (0-6).
|
|
1030
|
+
*/
|
|
1031
|
+
getFirstDayOfMonth : function() {
|
|
1032
|
+
var day = (this.getDay() - (this.getDate() - 1)) % 7;
|
|
1033
|
+
return (day < 0) ? (day + 7) : day;
|
|
1034
|
+
},
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* Get the last day of the current month, adjusted for leap year. The returned value
|
|
1038
|
+
* is the numeric day index within the week (0-6) which can be used in conjunction with
|
|
1039
|
+
* the {@link #monthNames} array to retrieve the textual day name.
|
|
1040
|
+
* Example:
|
|
1041
|
+
* <pre><code>
|
|
1042
|
+
var dt = new Date('1/10/2007');
|
|
1043
|
+
document.write(Date.dayNames[dt.getLastDayOfMonth()]); //output: 'Wednesday'
|
|
1044
|
+
</code></pre>
|
|
1045
|
+
* @return {Number} The day number (0-6).
|
|
1046
|
+
*/
|
|
1047
|
+
getLastDayOfMonth : function() {
|
|
1048
|
+
return this.getLastDateOfMonth().getDay();
|
|
1049
|
+
},
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* Get the date of the first day of the month in which this date resides.
|
|
1054
|
+
* @return {Date}
|
|
1055
|
+
*/
|
|
1056
|
+
getFirstDateOfMonth : function() {
|
|
1057
|
+
return new Date(this.getFullYear(), this.getMonth(), 1);
|
|
1058
|
+
},
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* Get the date of the last day of the month in which this date resides.
|
|
1062
|
+
* @return {Date}
|
|
1063
|
+
*/
|
|
1064
|
+
getLastDateOfMonth : function() {
|
|
1065
|
+
return new Date(this.getFullYear(), this.getMonth(), this.getDaysInMonth());
|
|
1066
|
+
},
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* Get the number of days in the current month, adjusted for leap year.
|
|
1070
|
+
* @return {Number} The number of days in the month.
|
|
1071
|
+
*/
|
|
1072
|
+
getDaysInMonth: function() {
|
|
1073
|
+
var daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1074
|
+
|
|
1075
|
+
return function() { // return a closure for efficiency
|
|
1076
|
+
var m = this.getMonth();
|
|
1077
|
+
|
|
1078
|
+
return m == 1 && this.isLeapYear() ? 29 : daysInMonth[m];
|
|
1079
|
+
}
|
|
1080
|
+
}(),
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* Get the English ordinal suffix of the current day (equivalent to the format specifier 'S').
|
|
1084
|
+
* @return {String} 'st, 'nd', 'rd' or 'th'.
|
|
1085
|
+
*/
|
|
1086
|
+
getSuffix : function() {
|
|
1087
|
+
switch (this.getDate()) {
|
|
1088
|
+
case 1:
|
|
1089
|
+
case 21:
|
|
1090
|
+
case 31:
|
|
1091
|
+
return "st";
|
|
1092
|
+
case 2:
|
|
1093
|
+
case 22:
|
|
1094
|
+
return "nd";
|
|
1095
|
+
case 3:
|
|
1096
|
+
case 23:
|
|
1097
|
+
return "rd";
|
|
1098
|
+
default:
|
|
1099
|
+
return "th";
|
|
1100
|
+
}
|
|
1101
|
+
},
|
|
1102
|
+
|
|
1103
|
+
/**
|
|
1104
|
+
* Creates and returns a new Date instance with the exact same date value as the called instance.
|
|
1105
|
+
* Dates are copied and passed by reference, so if a copied date variable is modified later, the original
|
|
1106
|
+
* variable will also be changed. When the intention is to create a new variable that will not
|
|
1107
|
+
* modify the original instance, you should create a clone.
|
|
1108
|
+
*
|
|
1109
|
+
* Example of correctly cloning a date:
|
|
1110
|
+
* <pre><code>
|
|
1111
|
+
//wrong way:
|
|
1112
|
+
var orig = new Date('10/1/2006');
|
|
1113
|
+
var copy = orig;
|
|
1114
|
+
copy.setDate(5);
|
|
1115
|
+
document.write(orig); //returns 'Thu Oct 05 2006'!
|
|
1116
|
+
|
|
1117
|
+
//correct way:
|
|
1118
|
+
var orig = new Date('10/1/2006');
|
|
1119
|
+
var copy = orig.clone();
|
|
1120
|
+
copy.setDate(5);
|
|
1121
|
+
document.write(orig); //returns 'Thu Oct 01 2006'
|
|
1122
|
+
</code></pre>
|
|
1123
|
+
* @return {Date} The new Date instance.
|
|
1124
|
+
*/
|
|
1125
|
+
clone : function() {
|
|
1126
|
+
return new Date(this.getTime());
|
|
1127
|
+
},
|
|
1128
|
+
|
|
1129
|
+
/**
|
|
1130
|
+
* Checks if the current date is affected by Daylight Saving Time (DST).
|
|
1131
|
+
* @return {Boolean} True if the current date is affected by DST.
|
|
1132
|
+
*/
|
|
1133
|
+
isDST : function() {
|
|
1134
|
+
// adapted from http://extjs.com/forum/showthread.php?p=247172#post247172
|
|
1135
|
+
// courtesy of @geoffrey.mcgill
|
|
1136
|
+
return new Date(this.getFullYear(), 0, 1).getTimezoneOffset() != this.getTimezoneOffset();
|
|
1137
|
+
},
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Attempts to clear all time information from this Date by setting the time to midnight of the same day,
|
|
1141
|
+
* automatically adjusting for Daylight Saving Time (DST) where applicable.
|
|
1142
|
+
* (note: DST timezone information for the browser's host operating system is assumed to be up-to-date)
|
|
1143
|
+
* @param {Boolean} clone true to create a clone of this date, clear the time and return it (defaults to false).
|
|
1144
|
+
* @return {Date} this or the clone.
|
|
1145
|
+
*/
|
|
1146
|
+
clearTime : function(clone) {
|
|
1147
|
+
if (clone) {
|
|
1148
|
+
return this.clone().clearTime();
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
// get current date before clearing time
|
|
1152
|
+
var d = this.getDate();
|
|
1153
|
+
|
|
1154
|
+
// clear time
|
|
1155
|
+
this.setHours(0);
|
|
1156
|
+
this.setMinutes(0);
|
|
1157
|
+
this.setSeconds(0);
|
|
1158
|
+
this.setMilliseconds(0);
|
|
1159
|
+
|
|
1160
|
+
if (this.getDate() != d) { // account for DST (i.e. day of month changed when setting hour = 0)
|
|
1161
|
+
// note: DST adjustments are assumed to occur in multiples of 1 hour (this is almost always the case)
|
|
1162
|
+
// refer to http://www.timeanddate.com/time/aboutdst.html for the (rare) exceptions to this rule
|
|
1163
|
+
|
|
1164
|
+
// increment hour until cloned date == current date
|
|
1165
|
+
for (var hr = 1, c = this.add(Date.HOUR, hr); c.getDate() != d; hr++, c = this.add(Date.HOUR, hr));
|
|
1166
|
+
|
|
1167
|
+
this.setDate(d);
|
|
1168
|
+
this.setHours(c.getHours());
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
return this;
|
|
1172
|
+
},
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* Provides a convenient method for performing basic date arithmetic. This method
|
|
1176
|
+
* does not modify the Date instance being called - it creates and returns
|
|
1177
|
+
* a new Date instance containing the resulting date value.
|
|
1178
|
+
*
|
|
1179
|
+
* Examples:
|
|
1180
|
+
* <pre><code>
|
|
1181
|
+
// Basic usage:
|
|
1182
|
+
var dt = new Date('10/29/2006').add(Date.DAY, 5);
|
|
1183
|
+
document.write(dt); //returns 'Fri Nov 03 2006 00:00:00'
|
|
1184
|
+
|
|
1185
|
+
// Negative values will be subtracted:
|
|
1186
|
+
var dt2 = new Date('10/1/2006').add(Date.DAY, -5);
|
|
1187
|
+
document.write(dt2); //returns 'Tue Sep 26 2006 00:00:00'
|
|
1188
|
+
|
|
1189
|
+
// You can even chain several calls together in one line:
|
|
1190
|
+
var dt3 = new Date('10/1/2006').add(Date.DAY, 5).add(Date.HOUR, 8).add(Date.MINUTE, -30);
|
|
1191
|
+
document.write(dt3); //returns 'Fri Oct 06 2006 07:30:00'
|
|
1192
|
+
</code></pre>
|
|
1193
|
+
*
|
|
1194
|
+
* @param {String} interval A valid date interval enum value.
|
|
1195
|
+
* @param {Number} value The amount to add to the current date.
|
|
1196
|
+
* @return {Date} The new Date instance.
|
|
1197
|
+
*/
|
|
1198
|
+
add : function(interval, value) {
|
|
1199
|
+
var d = this.clone();
|
|
1200
|
+
if (!interval || value === 0) return d;
|
|
1201
|
+
|
|
1202
|
+
switch(interval.toLowerCase()) {
|
|
1203
|
+
case Date.MILLI:
|
|
1204
|
+
d.setMilliseconds(this.getMilliseconds() + value);
|
|
1205
|
+
break;
|
|
1206
|
+
case Date.SECOND:
|
|
1207
|
+
d.setSeconds(this.getSeconds() + value);
|
|
1208
|
+
break;
|
|
1209
|
+
case Date.MINUTE:
|
|
1210
|
+
d.setMinutes(this.getMinutes() + value);
|
|
1211
|
+
break;
|
|
1212
|
+
case Date.HOUR:
|
|
1213
|
+
d.setHours(this.getHours() + value);
|
|
1214
|
+
break;
|
|
1215
|
+
case Date.DAY:
|
|
1216
|
+
d.setDate(this.getDate() + value);
|
|
1217
|
+
break;
|
|
1218
|
+
case Date.MONTH:
|
|
1219
|
+
var day = this.getDate();
|
|
1220
|
+
if (day > 28) {
|
|
1221
|
+
day = Math.min(day, this.getFirstDateOfMonth().add('mo', value).getLastDateOfMonth().getDate());
|
|
1222
|
+
}
|
|
1223
|
+
d.setDate(day);
|
|
1224
|
+
d.setMonth(this.getMonth() + value);
|
|
1225
|
+
break;
|
|
1226
|
+
case Date.YEAR:
|
|
1227
|
+
d.setFullYear(this.getFullYear() + value);
|
|
1228
|
+
break;
|
|
1229
|
+
}
|
|
1230
|
+
return d;
|
|
1231
|
+
},
|
|
1232
|
+
|
|
1233
|
+
/**
|
|
1234
|
+
* Checks if this date falls on or between the given start and end dates.
|
|
1235
|
+
* @param {Date} start Start date
|
|
1236
|
+
* @param {Date} end End date
|
|
1237
|
+
* @return {Boolean} true if this date falls on or between the given start and end dates.
|
|
1238
|
+
*/
|
|
1239
|
+
between : function(start, end) {
|
|
1240
|
+
var t = this.getTime();
|
|
1241
|
+
return start.getTime() <= t && t <= end.getTime();
|
|
1242
|
+
}
|
|
1243
|
+
});
|
|
1244
|
+
|
|
1245
|
+
|
|
1246
|
+
/**
|
|
1247
|
+
* Formats a date given the supplied format string.
|
|
1248
|
+
* @param {String} format The format string.
|
|
1249
|
+
* @return {String} The formatted date.
|
|
1250
|
+
* @method format
|
|
1251
|
+
*/
|
|
1252
|
+
Date.prototype.format = Date.prototype.dateFormat;
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
// private
|
|
1256
|
+
if (Ext.isSafari && (navigator.userAgent.match(/WebKit\/(\d+)/)[1] || NaN) < 420) {
|
|
1257
|
+
Ext.apply(Date.prototype, {
|
|
1258
|
+
_xMonth : Date.prototype.setMonth,
|
|
1259
|
+
_xDate : Date.prototype.setDate,
|
|
1260
|
+
|
|
1261
|
+
// Bug in Safari 1.3, 2.0 (WebKit build < 420)
|
|
1262
|
+
// Date.setMonth does not work consistently if iMonth is not 0-11
|
|
1263
|
+
setMonth : function(num) {
|
|
1264
|
+
if (num <= -1) {
|
|
1265
|
+
var n = Math.ceil(-num),
|
|
1266
|
+
back_year = Math.ceil(n / 12),
|
|
1267
|
+
month = (n % 12) ? 12 - n % 12 : 0;
|
|
1268
|
+
|
|
1269
|
+
this.setFullYear(this.getFullYear() - back_year);
|
|
1270
|
+
|
|
1271
|
+
return this._xMonth(month);
|
|
1272
|
+
} else {
|
|
1273
|
+
return this._xMonth(num);
|
|
1274
|
+
}
|
|
1275
|
+
},
|
|
1276
|
+
|
|
1277
|
+
// Bug in setDate() method (resolved in WebKit build 419.3, so to be safe we target Webkit builds < 420)
|
|
1278
|
+
// The parameter for Date.setDate() is converted to a signed byte integer in Safari
|
|
1279
|
+
// http://brianary.blogspot.com/2006/03/safari-date-bug.html
|
|
1280
|
+
setDate : function(d) {
|
|
1281
|
+
// use setTime() to workaround setDate() bug
|
|
1282
|
+
// subtract current day of month in milliseconds, then add desired day of month in milliseconds
|
|
1283
|
+
return this.setTime(this.getTime() - (this.getDate() - d) * 864e5);
|
|
1284
|
+
}
|
|
1285
|
+
});
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
|
|
1290
|
+
/* Some basic Date tests... (requires Firebug)
|
|
1291
|
+
|
|
1292
|
+
Date.parseDate('', 'c'); // call Date.parseDate() once to force computation of regex string so we can console.log() it
|
|
1293
|
+
console.log('Insane Regex for "c" format: %o', Date.parseCodes.c.s); // view the insane regex for the "c" format specifier
|
|
1294
|
+
|
|
1295
|
+
// standard tests
|
|
1296
|
+
console.group('Standard Date.parseDate() Tests');
|
|
1297
|
+
console.log('Date.parseDate("2009-01-05T11:38:56", "c") = %o', Date.parseDate("2009-01-05T11:38:56", "c")); // assumes browser's timezone setting
|
|
1298
|
+
console.log('Date.parseDate("2009-02-04T12:37:55.001000", "c") = %o', Date.parseDate("2009-02-04T12:37:55.001000", "c")); // assumes browser's timezone setting
|
|
1299
|
+
console.log('Date.parseDate("2009-03-03T13:36:54,101000Z", "c") = %o', Date.parseDate("2009-03-03T13:36:54,101000Z", "c")); // UTC
|
|
1300
|
+
console.log('Date.parseDate("2009-04-02T14:35:53.901000-0530", "c") = %o', Date.parseDate("2009-04-02T14:35:53.901000-0530", "c")); // GMT-0530
|
|
1301
|
+
console.log('Date.parseDate("2009-05-01T15:34:52,9876000+08:00", "c") = %o', Date.parseDate("2009-05-01T15:34:52,987600+08:00", "c")); // GMT+08:00
|
|
1302
|
+
console.groupEnd();
|
|
1303
|
+
|
|
1304
|
+
// ISO-8601 format as specified in http://www.w3.org/TR/NOTE-datetime
|
|
1305
|
+
// -- accepts ALL 6 levels of date-time granularity
|
|
1306
|
+
console.group('ISO-8601 Granularity Test (see http://www.w3.org/TR/NOTE-datetime)');
|
|
1307
|
+
console.log('Date.parseDate("1997", "c") = %o', Date.parseDate("1997", "c")); // YYYY (e.g. 1997)
|
|
1308
|
+
console.log('Date.parseDate("1997-07", "c") = %o', Date.parseDate("1997-07", "c")); // YYYY-MM (e.g. 1997-07)
|
|
1309
|
+
console.log('Date.parseDate("1997-07-16", "c") = %o', Date.parseDate("1997-07-16", "c")); // YYYY-MM-DD (e.g. 1997-07-16)
|
|
1310
|
+
console.log('Date.parseDate("1997-07-16T19:20+01:00", "c") = %o', Date.parseDate("1997-07-16T19:20+01:00", "c")); // YYYY-MM-DDThh:mmTZD (e.g. 1997-07-16T19:20+01:00)
|
|
1311
|
+
console.log('Date.parseDate("1997-07-16T19:20:30+01:00", "c") = %o', Date.parseDate("1997-07-16T19:20:30+01:00", "c")); // YYYY-MM-DDThh:mm:ssTZD (e.g. 1997-07-16T19:20:30+01:00)
|
|
1312
|
+
console.log('Date.parseDate("1997-07-16T19:20:30.45+01:00", "c") = %o', Date.parseDate("1997-07-16T19:20:30.45+01:00", "c")); // YYYY-MM-DDThh:mm:ss.sTZD (e.g. 1997-07-16T19:20:30.45+01:00)
|
|
1313
|
+
console.log('Date.parseDate("1997-07-16 19:20:30.45+01:00", "c") = %o', Date.parseDate("1997-07-16 19:20:30.45+01:00", "c")); // YYYY-MM-DD hh:mm:ss.sTZD (e.g. 1997-07-16T19:20:30.45+01:00)
|
|
1314
|
+
console.log('Date.parseDate("1997-13-16T19:20:30.45+01:00", "c", true)= %o', Date.parseDate("1997-13-16T19:20:30.45+01:00", "c", true)); // strict date parsing with invalid month value
|
|
1315
|
+
console.groupEnd();
|
|
1316
|
+
|
|
1317
|
+
//*/
|