1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.4">
- <TypeDefinition url="..\default_typedef.xml"/>
- <Form id="dl_periodDayCalendar" classname="CommonBtn" inheritanceid="" position="absolute 0 0 410 255" titletext="Comm_FromTo" onload="dl_periodDayCalendar_onload" scrollbars="none">
- <Layouts>
- <Layout>
- <Static id="stc_Body" text="Message" class="St_popupBg02" enable="false" position="absolute 0 0 405 250" style=":disabled {padding:0 0 0 90;}"/>
- <Static id="Static00" class="sta_Month" position="absolute 1 1 404 33"/>
- <Button id="btn_Close" taborder="1" text="Close" onclick="btn_Close_onclick" class="btn5" position="absolute 205 219 259 239"/>
- <Button id="btn_Ok" taborder="1" text="Select" onclick="btn_Ok_onclick" class="btn5" position="absolute 141 219 203 239"/>
- <Div id="divTo" taborder="1" class="div_POPCA_divLine" position="absolute 208 0 404 209">
- <Layouts>
- <Layout>
- <Static id="stcD36" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 185 36 209" anchor="default"/>
- <Static id="stcD42" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 185 186 209" anchor="default"/>
- <Static id="stcD41" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 185 161 209" anchor="default"/>
- <Static id="stcD40" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 185 136 209" anchor="default"/>
- <Static id="stcD39" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 185 111 209" anchor="default"/>
- <Static id="stcD38" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 185 86 209" anchor="default"/>
- <Static id="stcD37" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 185 61 209" anchor="default"/>
- <Static id="stcD29" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 162 36 186" anchor="default"/>
- <Static id="stcD22" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 139 36 163" anchor="default"/>
- <Static id="stcD15" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 116 36 140" anchor="default"/>
- <Static id="stcD8" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 93 36 117" anchor="default"/>
- <Static id="stcD28" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 139 186 163" anchor="default"/>
- <Static id="stcD35" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 162 186 186" anchor="default"/>
- <Static id="stcD21" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 116 186 140" anchor="default"/>
- <Static id="stcD14" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 93 186 117" anchor="default"/>
- <Static id="stcD34" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 162 161 186" anchor="default"/>
- <Static id="stcD27" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 139 161 163" anchor="default"/>
- <Static id="stcD20" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 116 161 140" anchor="default"/>
- <Static id="stcD13" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 93 161 117" anchor="default"/>
- <Static id="stcD12" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 93 136 117" anchor="default"/>
- <Static id="stcD19" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 116 136 140" anchor="default"/>
- <Static id="stcD26" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 139 136 163" anchor="default"/>
- <Static id="stcD33" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 162 136 186" anchor="default"/>
- <Static id="stcD32" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 162 111 186" anchor="default"/>
- <Static id="stcD25" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 139 111 163" anchor="default"/>
- <Static id="stcD18" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 116 111 140" anchor="default"/>
- <Static id="stcD11" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 93 111 117" anchor="default"/>
- <Static id="stcD10" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 93 86 117" anchor="default"/>
- <Static id="stcD17" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 116 86 140" anchor="default"/>
- <Static id="stcD24" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 139 86 163" anchor="default"/>
- <Static id="stcD31" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 162 86 186" anchor="default"/>
- <Static id="stcD30" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 162 61 186" anchor="default"/>
- <Static id="stcD23" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 139 61 163" anchor="default"/>
- <Static id="stcD16" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 116 61 140" anchor="default"/>
- <Static id="stcD9" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 93 61 117" anchor="default"/>
- <Static id="stcD2" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 70 61 94" style="color:dimgray; " anchor="default"/>
- <Static id="stcD7" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 70 186 94" anchor="default"/>
- <Static id="stcD6" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 70 161 94" style="color:dimgray; " anchor="default"/>
- <Static id="stcD5" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 70 136 94" anchor="default"/>
- <Static id="stcD4" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 70 111 94" anchor="default"/>
- <Static id="stcD3" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 70 86 94" style="color:dimgray; " anchor="default"/>
- <Static id="stcD1" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 70 36 94" anchor="default"/>
- <Static id="stcYear" text="2012" class="St_POPCA_stcYear" position="absolute 26 9 80 24" style="align:center middle; " anchor="default"/>
- <Button id="btn_NextYear" taborder="1" onclick="btn_NextYear_onclick" class="icon_next_year" position="absolute 80 9 96 25" anchor="default"/>
- <Button id="btn_PreYear" taborder="1" onclick="btn_PreYear_onclick" class="icon_pre_year" position="absolute 10 9 26 25" anchor="default"/>
- <Combo id="cboMon" taborder="1" innerdataset="dstMonth" codecolumn="code" datacolumn="code" onitemchanged="cbo_Mon_onitemchanged" position="absolute 118 7 167 27" anchor="default" class="calendar_output"/>
- <Button id="btn_PreMon" taborder="1" onclick="btn_PreMon_onclick" class="icon_pre_month" position="absolute 99 9 115 25" anchor="default"/>
- <Button id="btn_NextMon" taborder="1" onclick="btn_NextMon_onclick" class="icon_next_month" position="absolute 170 9 186 25" anchor="default"/>
- <Static id="stc0" text="Sun" class="St_CalDW_Sun" position="absolute 10 47 37 71" anchor="default"/>
- <Static id="stc1" text="Mon" class="St_CalDW_Day" position="absolute 35 47 61 71" anchor="default"/>
- <Static id="stc2" text="Tue" class="St_CalDW_Day" position="absolute 60 47 86 71" anchor="default"/>
- <Static id="stc3" text="Wed" class="St_CalDW_Day" position="absolute 85 47 111 71" anchor="default"/>
- <Static id="stc4" text="Thu" class="St_CalDW_Day" position="absolute 110 47 136 71" anchor="default"/>
- <Static id="stc5" text="Fri" class="St_CalDW_Day" position="absolute 135 47 161 71" anchor="default"/>
- <Static id="stc6" text="Sat" class="St_CalDW_Sat" position="absolute 160 47 186 71" anchor="default"/>
- </Layout>
- </Layouts>
- </Div>
- <Div id="divFrom" taborder="2" class="div_POPCA_divLine" position="absolute 8 0 204 209">
- <Layouts>
- <Layout>
- <Static id="stcD36" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 185 36 209" anchor="default"/>
- <Static id="stcD42" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 185 186 209" anchor="default"/>
- <Static id="stcD41" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 185 161 209" anchor="default"/>
- <Static id="stcD40" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 185 136 209" anchor="default"/>
- <Static id="stcD39" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 185 111 209" anchor="default"/>
- <Static id="stcD38" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 185 86 209" anchor="default"/>
- <Static id="stcD37" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 185 61 209" anchor="default"/>
- <Static id="stcD29" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 162 36 186" anchor="default"/>
- <Static id="stcD22" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 139 36 163" anchor="default"/>
- <Static id="stcD15" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 116 36 140" anchor="default"/>
- <Static id="stcD8" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 93 36 117" anchor="default"/>
- <Static id="stcD28" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 139 186 163" anchor="default"/>
- <Static id="stcD35" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 162 186 186" anchor="default"/>
- <Static id="stcD21" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 116 186 140" anchor="default"/>
- <Static id="stcD14" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 93 186 117" anchor="default"/>
- <Static id="stcD34" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 162 161 186" anchor="default"/>
- <Static id="stcD27" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 139 161 163" anchor="default"/>
- <Static id="stcD20" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 116 161 140" anchor="default"/>
- <Static id="stcD13" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 93 161 117" anchor="default"/>
- <Static id="stcD12" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 93 136 117" anchor="default"/>
- <Static id="stcD19" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 116 136 140" anchor="default"/>
- <Static id="stcD26" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 139 136 163" anchor="default"/>
- <Static id="stcD33" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 162 136 186" anchor="default"/>
- <Static id="stcD32" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 162 111 186" anchor="default"/>
- <Static id="stcD25" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 139 111 163" anchor="default"/>
- <Static id="stcD18" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 116 111 140" anchor="default"/>
- <Static id="stcD11" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 93 111 117" anchor="default"/>
- <Static id="stcD10" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 93 86 117" anchor="default"/>
- <Static id="stcD17" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 116 86 140" anchor="default"/>
- <Static id="stcD24" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 139 86 163" anchor="default"/>
- <Static id="stcD31" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 162 86 186" anchor="default"/>
- <Static id="stcD30" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 162 61 186" anchor="default"/>
- <Static id="stcD23" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 139 61 163" anchor="default"/>
- <Static id="stcD16" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 116 61 140" anchor="default"/>
- <Static id="stcD9" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 93 61 117" anchor="default"/>
- <Static id="stcD2" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 70 61 94" style="color:dimgray; " anchor="default"/>
- <Static id="stcD7" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 70 186 94" anchor="default"/>
- <Static id="stcD6" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 70 161 94" style="color:dimgray; " anchor="default"/>
- <Static id="stcD5" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 70 136 94" anchor="default"/>
- <Static id="stcD4" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 70 111 94" anchor="default"/>
- <Static id="stcD3" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 70 86 94" style="color:dimgray; " anchor="default"/>
- <Static id="stcD1" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 70 36 94" anchor="default"/>
- <Static id="stcYear" text="2010" class="St_POPCA_stcYear" position="absolute 26 9 80 24" style="align:center middle; " anchor="default"/>
- <Button id="btn_NextYear" taborder="2" onclick="btn_NextYear_onclick" class="icon_next_year" position="absolute 80 9 96 25" anchor="default"/>
- <Button id="btn_PreYear" taborder="3" onclick="btn_PreYear_onclick" class="icon_pre_year" position="absolute 10 9 26 25" anchor="default"/>
- <Combo id="cboMon" taborder="4" innerdataset="dstMonth" codecolumn="code" datacolumn="code" onitemchanged="cbo_Mon_onitemchanged" position="absolute 118 7 167 27" anchor="default" class="calendar_output"/>
- <Button id="btn_PreMon" taborder="5" onclick="btn_PreMon_onclick" class="icon_pre_month" position="absolute 99 9 115 25" anchor="default"/>
- <Button id="btn_NextMon" taborder="6" onclick="btn_NextMon_onclick" class="icon_next_month" position="absolute 170 9 186 25" anchor="default"/>
- <Static id="stc0" text="Sun" class="St_CalDW_Sun" position="absolute 10 47 37 71" anchor="default"/>
- <Static id="stc1" text="Mon" class="St_CalDW_Day" position="absolute 35 47 61 71" anchor="default"/>
- <Static id="stc2" text="Tue" class="St_CalDW_Day" position="absolute 60 47 86 71" anchor="default"/>
- <Static id="stc3" text="Wed" class="St_CalDW_Day" position="absolute 85 47 111 71" anchor="default"/>
- <Static id="stc4" text="Thu" class="St_CalDW_Day" position="absolute 110 47 136 71" anchor="default"/>
- <Static id="stc5" text="Fri" class="St_CalDW_Day" position="absolute 135 47 161 71" anchor="default"/>
- <Static id="stc6" text="Sat" class="St_CalDW_Sat" position="absolute 160 47 186 71" anchor="default"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Bind>
- <BindItem id="item2" compid="btn_Close" propid="text" datasetid="gdstDomain" columnid="FW000333"/>
- <BindItem id="item0" compid="btn_Ok" propid="text" datasetid="gdstDomain" columnid="FW000379"/>
- </Bind>
- <Objects>
- <Dataset id="dstYear" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="year" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="dstDayChOpt" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="CODE" type="STRING" size="256"/>
- <Column id="NAME" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="CODE">1</Col>
- <Col id="NAME">This Week</Col>
- </Row>
- <Row>
- <Col id="CODE">2</Col>
- <Col id="NAME">Last Week</Col>
- </Row>
- <Row>
- <Col id="CODE">3</Col>
- <Col id="NAME">This Mon</Col>
- </Row>
- <Row>
- <Col id="CODE">4</Col>
- <Col id="NAME">Last Mon</Col>
- </Row>
- <Row>
- <Col id="CODE">5</Col>
- <Col id="NAME">This Quarter</Col>
- </Row>
- <Row>
- <Col id="CODE">6</Col>
- <Col id="NAME">Last Quarter</Col>
- </Row>
- <Row>
- <Col id="CODE">7</Col>
- <Col id="NAME">This Year(Sum)</Col>
- </Row>
- <Row>
- <Col id="CODE">8</Col>
- <Col id="NAME">This Year(Tot)</Col>
- </Row>
- <Row>
- <Col id="CODE">9</Col>
- <Col id="NAME">Last Year(Sum)</Col>
- </Row>
- <Row>
- <Col id="CODE">10</Col>
- <Col id="NAME">Last Year(Tot)</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="dstDayOpt" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="CODE" type="STRING" size="256"/>
- <Column id="NAME" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="CODE">1</Col>
- <Col id="NAME">일반</Col>
- </Row>
- <Row>
- <Col id="CODE">2</Col>
- <Col id="NAME">영업일</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="dstCalendar" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="a" type="STRING" size="256"/>
- <Column id="b" type="STRING" size="256"/>
- <Column id="d1" type="STRING" size="256"/>
- <Column id="d11" type="STRING" size="256"/>
- <Column id="d2" type="STRING" size="256"/>
- <Column id="d22" type="STRING" size="256"/>
- <Column id="d3" type="STRING" size="256"/>
- <Column id="d33" type="STRING" size="256"/>
- <Column id="d4" type="STRING" size="256"/>
- <Column id="d44" type="STRING" size="256"/>
- <Column id="d5" type="STRING" size="256"/>
- <Column id="d55" type="STRING" size="256"/>
- <Column id="d6" type="STRING" size="256"/>
- <Column id="d66" type="STRING" size="256"/>
- <Column id="d7" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="dstMonth" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="code" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="code">1</Col>
- </Row>
- <Row>
- <Col id="code">2</Col>
- </Row>
- <Row>
- <Col id="code">3</Col>
- </Row>
- <Row>
- <Col id="code">4</Col>
- </Row>
- <Row>
- <Col id="code">5</Col>
- </Row>
- <Row>
- <Col id="code">6</Col>
- </Row>
- <Row>
- <Col id="code">7</Col>
- </Row>
- <Row>
- <Col id="code">8</Col>
- </Row>
- <Row>
- <Col id="code">9</Col>
- </Row>
- <Row>
- <Col id="code">10</Col>
- </Row>
- <Row>
- <Col id="code">11</Col>
- </Row>
- <Row>
- <Col id="code">12</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="dstDayOptE" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="CODE" type="STRING" size="256"/>
- <Column id="NAME" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="CODE">1</Col>
- <Col id="NAME">General</Col>
- </Row>
- <Row>
- <Col id="CODE">2</Col>
- <Col id="NAME">Business Day</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="dstHoliday" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="wkymd" type="STRING" size="256"/>
- <Column id="text_color" type="STRING" size="256"/>
- <Column id="kname" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="dstCalMonth" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="mon" type="STRING" size="256"/>
- <Column id="chk" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="mon">1 M</Col>
- <Col id="chk"/>
- </Row>
- <Row>
- <Col id="mon">2 M</Col>
- <Col id="chk"/>
- </Row>
- <Row>
- <Col id="mon">3 M</Col>
- <Col id="chk"/>
- </Row>
- <Row>
- <Col id="mon">4 M</Col>
- <Col id="chk"/>
- </Row>
- <Row>
- <Col id="mon">5 M</Col>
- <Col id="chk"/>
- </Row>
- <Row>
- <Col id="mon">6 M</Col>
- <Col id="chk"/>
- </Row>
- <Row>
- <Col id="mon">7 M</Col>
- <Col id="chk"/>
- </Row>
- <Row>
- <Col id="mon">8 M</Col>
- <Col id="chk"/>
- </Row>
- <Row>
- <Col id="mon">9 M</Col>
- <Col id="chk"/>
- </Row>
- <Row>
- <Col id="mon">10 M</Col>
- <Col id="chk"/>
- </Row>
- <Row>
- <Col id="mon">11 M</Col>
- <Col id="chk"/>
- </Row>
- <Row>
- <Col id="mon">12 M</Col>
- <Col id="chk"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="dstDayChOptE" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="CODE" type="STRING" size="256"/>
- <Column id="NAME" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="CODE">1</Col>
- <Col id="NAME">Today</Col>
- </Row>
- <Row>
- <Col id="CODE">2</Col>
- <Col id="NAME">Yesterday</Col>
- </Row>
- <Row>
- <Col id="CODE">3</Col>
- <Col id="NAME">ThisWeek</Col>
- </Row>
- <Row>
- <Col id="CODE">4</Col>
- <Col id="NAME">LastWeek</Col>
- </Row>
- <Row>
- <Col id="CODE">5</Col>
- <Col id="NAME">ThisMonth</Col>
- </Row>
- <Row>
- <Col id="CODE">6</Col>
- <Col id="NAME">LastMonth</Col>
- </Row>
- <Row>
- <Col id="CODE">7</Col>
- <Col id="NAME">ThisQuarter</Col>
- </Row>
- <Row>
- <Col id="CODE">8</Col>
- <Col id="NAME">LastQuarter</Col>
- </Row>
- <Row>
- <Col id="CODE">9</Col>
- <Col id="NAME">ThisYear(Today)</Col>
- </Row>
- <Row>
- <Col id="CODE">10</Col>
- <Col id="NAME">ThisYear(12/31)</Col>
- </Row>
- <Row>
- <Col id="CODE">11</Col>
- <Col id="NAME">LastYear</Col>
- </Row>
- </Rows>
- </Dataset>
- </Objects>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name : KMTC
- * Job Name : Composite to Div
- * File Name : dl_periodDayCalendar.xfdl
- * Creator : TOBESOFT
- * Make Date : 2013.01.18
- *
- * Description : Calendar Day Period Select Composite
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2013.01.18 TOBESOFT Initial Make Program
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Common Lib Include
- //---------------------------------------------------------------------------------------
- //include "Lib::xCommon.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var iv_maMonth = new Array(12);
- var iv_msToday;
- var iv_mvArgValue;
- var iv_msStDate, iv_msEdDate;
- var iv_msSundayPosition = "F";
- // Sun ~ Fri : iv_msSundayPosition = "F"
- // Mon ~ Sun : iv_msSundayPosition = "L"
- /****************************************************************************************
- * Description : Form Initialization
- * Argument : obj : Object Event has occurred
- * : e : Event Object
- * return :
- ****************************************************************************************/
- function dl_periodDayCalendar_onload(obj:Form, e:LoadEventInfo)
- {
- iv_maMonth = [31,0,31,30,31,30,31,31,30,31,30,31];
-
- fn_TitleSet(divFrom);
- fn_TitleSet(divTo);
- }
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Combo
- * Event : onitemchanged
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : Selected month
- ****************************************************************************************/
- function cbo_Mon_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- var oDiv = obj.parent;
- var strYY = oDiv.stcYear.text;
- var nM = new String(e.postindex + 1);
- var strMM = nM.padLeft(2,"0");
-
- if(oDiv.name == "divFrom") iv_msStDate = strYY + strMM + iv_msStDate.substr(6, 2);
- else iv_msEdDate = strYY + strMM + iv_msEdDate.substr(6, 2);
-
- fn_SetCalendar(oDiv, strYY, strMM, "");
- }
- /****************************************************************************************
- * Components : Radio
- * Event : onitemchanged
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : Selected calendar option
- ****************************************************************************************/
- function rdo_DayChOpt_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
- {
- var sDate;
- var sGb = e.postvalue;
- switch(sGb) {
- // This week
- case "1" : var nIdx = ufn_getDay(ufn_getDate());
- iv_msStDate = ufn_addDate(ufn_getDate(), (0-nIdx));
- iv_msEdDate = ufn_addDate(ufn_getDate(), (6-nIdx));
- break;
- // Before week
- case "2" : sDate = ufn_addDate(ufn_getDate(), -7);
- var nIdx = ufn_getDay(sDate);
- iv_msStDate = ufn_addDate(sDate, (0-nIdx));
- iv_msEdDate = ufn_addDate(sDate, (6-nIdx));
- break;
- // This month
- case "3" : sDate = ufn_getDate().substr(0, 6) + "01";
- iv_msStDate = sDate;
- iv_msEdDate = sDate.substr(0, 6) + fn_LastDateNum(sDate);
- break;
- // Before month
- case "4" : sDate = ufn_addMonth(ufn_getDate(), -1).substr(0, 6) + "01";
- iv_msStDate = sDate;
- iv_msEdDate = sDate.substr(0, 6) + fn_LastDateNum(sDate);
- break;
- // Quarter
- case "5" : var aDate = fn_GetCurQDate(ufn_getDate());
- iv_msStDate = aDate[0];
- iv_msEdDate = aDate[1];
- break;
- // Before quarter
- case "6" : var aDate = fn_GetCurQDate(ufn_getDate());
- aDate = fn_GetCurQDate(ufn_addMonth(aDate[0], -1));
- iv_msStDate = aDate[0];
- iv_msEdDate = aDate[1];
- break;
- // This year(Accumulated)
- case "7" : sDate = ufn_getDate().substr(0, 4) + "0101";
- iv_msStDate = sDate;
- iv_msEdDate = ufn_getDate();
- break;
- // This year(Total)
- case "8" : sDate = ufn_getDate().substr(0, 4);
- iv_msStDate = sDate + "0101";
- iv_msEdDate = sDate + "1231";
- break;
- // Before year(Accumulated)
- case "9" : sDate = (parseInt(ufn_getDate().substr(0, 4) - 1)).toString();
- iv_msStDate = sDate + "0101"
- iv_msEdDate = sDate + ufn_getDate().substr(4, 4);
- break;
- // Before year(Total)
- case "10" : sDate = ufn_addMonth(ufn_getDate(), -12).substr(0, 4);
- iv_msStDate = sDate + "0101";
- iv_msEdDate = sDate + "1231";
- break;
- }
-
- fn_SetDay("F", iv_msStDate);
- fn_SetDay("T", iv_msEdDate);
- }
- /****************************************************************************************
- * Components : Button
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : Selected next month
- ****************************************************************************************/
- function btn_NextMon_onclick(obj:Button, e:ClickEventInfo)
- {
- var oDiv = obj.parent;
- var strYY = oDiv.stcYear.text;
- var nM = ufn_decode(oDiv.cboMon.index,11,1,oDiv.cboMon.index+2);
-
- if(nM==1) {
- oDiv.stcYear.text = (parseInt(strYY) + 1).toString();
- strYY = oDiv.stcYear.text;
- }
-
- var strM = new String(nM);
- var strMM = strM.padLeft(2,"0");
-
- if(oDiv.name == "divFrom") iv_msStDate = strYY + strMM + iv_msStDate.substr(6, 2);
- else iv_msEdDate = strYY + strMM + iv_msEdDate.substr(6, 2);
-
- fn_SetCalendar(oDiv, strYY, strMM, "");
- }
- /****************************************************************************************
- * Components : Button
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : Selected prev month
- ****************************************************************************************/
- function btn_PreMon_onclick(obj:Button, e:ClickEventInfo)
- {
- var oDiv = obj.parent;
- var strYY = oDiv.stcYear.text;
- var nM = ufn_decode(oDiv.cboMon.index,0,12,oDiv.cboMon.index);
-
- if(nM==12) {
- oDiv.stcYear.text = (parseInt(strYY) - 1).toString();
- strYY = oDiv.stcYear.text;
- }
-
- var strM = new String(nM);
- var strMM = strM.padLeft(2,"0");
-
- if(oDiv.name == "divFrom") iv_msStDate = strYY + strMM + iv_msStDate.substr(6, 2);
- else iv_msEdDate = strYY + strMM + iv_msEdDate.substr(6, 2);
-
- fn_SetCalendar(oDiv, strYY, strMM, "");
- }
- /****************************************************************************************
- * Components : Button
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : Selected next year
- ****************************************************************************************/
- function btn_NextYear_onclick(obj:Button, e:ClickEventInfo)
- {
- var oDiv = obj.parent;
- var strYY = oDiv.stcYear.text;
- oDiv.stcYear.text = (parseInt(strYY) + 1).toString();
- strYY = oDiv.stcYear.text;
- var nM = oDiv.cboMon.index + 1;
-
- var strM = new String(nM);
- var strMM = strM.padLeft(2,"0");
-
- if(oDiv.name == "divFrom") iv_msStDate = strYY + strMM + iv_msStDate.substr(6, 2);
- else iv_msEdDate = strYY + strMM + iv_msEdDate.substr(6, 2);
-
- fn_SetCalendar(oDiv,strYY,strMM,"");
- }
- /****************************************************************************************
- * Components : Button
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : Selected prev year
- ****************************************************************************************/
- function btn_PreYear_onclick(obj:Button, e:ClickEventInfo)
- {
- var oDiv = obj.parent;
- var strYY = oDiv.stcYear.text;
- oDiv.stcYear.text = (parseInt(strYY) - 1).toString();
- strYY = oDiv.stcYear.text;
- var nM = oDiv.cboMon.index + 1;
-
- var strM = new String(nM);
- var strMM = strM.padLeft(2,"0");
-
- if(oDiv.name == "divFrom") iv_msStDate = strYY + strMM + iv_msStDate.substr(6, 2);
- else iv_msEdDate = strYY + strMM + iv_msEdDate.substr(6, 2);
-
- fn_SetCalendar(oDiv,strYY,strMM,"");
- }
- /****************************************************************************************
- * Components : Static
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : Selected current date
- ****************************************************************************************/
- function stcD_onclick(obj:Static, e:ClickEventInfo)
- {
- var oDiv = obj.parent;
- var strYY = oDiv.stcYear.text;
-
- var strIdx = new String(oDiv.cboMon.index+1);
- var strMM = strIdx.padLeft(2,"0");
- var strDD = obj.text.padLeft(2,"0");
-
- if(oDiv.name == "divTo") iv_msEdDate = strYY + strMM + strDD;
- else iv_msStDate = strYY + strMM + strDD;
-
- fn_SetCalendar(oDiv,strYY,strMM,strDD);
- }
- /****************************************************************************************
- * Components : Button
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : Selected ok button
- ****************************************************************************************/
- function btn_Ok_onclick(obj:Button, e:ClickEventInfo)
- {
- var sFromDate = iv_msStDate;
- var sToDate = iv_msEdDate;
-
- if(ufn_isDate(sToDate) == true && ufn_isDate(sToDate) == true){
- var retVal = ufn_compareDate(sFromDate, sToDate);
- if(retVal > 0){
- alert("from date 보다 to date가 작을수 없습니다");
- return false;
- }
- }else{
- alert("The date format is not");
- return false;
- }
-
- var aRtnVal = new Array(3);
- aRtnVal[0] = iv_msStDate;
- aRtnVal[1] = iv_msEdDate;
- aRtnVal[2] = "N";
-
- closePopup(aRtnVal);
- }
- /****************************************************************************************
- * Components : Button
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : Selected close button
- ****************************************************************************************/
- function btn_Close_onclick(obj:Button, e:ClickEventInfo)
- {
- closePopup();
- }
- //=======================================================================================
- // User Function
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Description : Load calendar of day
- * Argument : none
- * return : none
- ****************************************************************************************/
- function fn_TitleSet(oDiv)
- {
- if(iv_msSundayPosition == "L") {
- oDiv.stc0.text = "Mon";
- oDiv.stc1.text = "Tue";
- oDiv.stc2.text = "Wed";
- oDiv.stc3.text = "The";
- oDiv.stc4.text = "Fri";
- oDiv.stc5.text = "Sat";
- oDiv.stc6.text = "Sun";
- } else {
- oDiv.stc0.text = "Sun";
- oDiv.stc1.text = "Mon";
- oDiv.stc2.text = "Tue";
- oDiv.stc3.text = "Wed";
- oDiv.stc4.text = "The";
- oDiv.stc5.text = "Fri";
- oDiv.stc6.text = "Sat";
- }
- }
- function fn_CrCal()
- {
- if(iv_mvArgValue[0] <> null) iv_msStDate = iv_mvArgValue[0];
- if(iv_mvArgValue[1] <> null) iv_msEdDate = iv_mvArgValue[1];
-
- if(iv_msStDate == null) iv_msStDate = "";
- if(iv_msEdDate == null) iv_msEdDate = "";
-
- if(iv_msStDate.length == 0) {
- iv_msStDate = (ufn_getDate()).substr(0,8);
- }
-
- if(iv_msEdDate.length == 0) {
- iv_msEdDate = (ufn_getDate()).substr(0,8);
- }
- var strYY = iv_msStDate.substr(0,4);
- var strMM = iv_msStDate.substr(4,2);
- var strDD = iv_msStDate.substr(6,2);
- fn_SetCalendar(divFrom, strYY,strMM,strDD);
-
- strYY = iv_msEdDate.substr(0,4);
- strMM = iv_msEdDate.substr(4,2);
- strDD = iv_msEdDate.substr(6,2);
-
- fn_SetCalendar(divTo, strYY,strMM,strDD);
- }
- /****************************************************************************************
- * Description : Load calendar
- * Argument : 1.oDiv : Division object
- * : 2.strYY : yyyy
- * : 3.strMM : MM
- * : 4.strDD : DD
- * return : none
- ****************************************************************************************/
- function fn_SetCalendar(oDiv, strYY, strMM, strDD)
- {
- var bCurMonth = false;
-
- if(strDD == null) strDD = "";
- if(strDD.length == 0) strDD = ufn_getDate().substr(6,2);
- if((ufn_getDate().substr(0,4) == strYY) && (ufn_getDate().substr(4,2) == strMM)) {
- bCurMonth = true;
- }
-
- dstCalendar.clearData();
-
- var nLastDay = iv_maMonth[parseInt(strMM)-1];
- oDiv.cboMon.index = parseInt(strMM)-1;
- oDiv.stcYear.text = strYY;
-
- // The final date set in February
- if(parseInt(strMM) == 2) {
- nLastDay = ufn_getMonthLastDay(strYY+strMM+"01");
- }
-
- var nFDay = ufn_getDay(strYY + strMM + "01");
-
- if(iv_msSundayPosition == "L") {
- nFDay = ufn_decode(nFDay,0,7,nFDay);
- } else{
- nFDay++;
- }
-
- var svnFDay = nFDay;
- var strLastDay = new String(nLastDay);
- var nLDay = ufn_getDay(strYY + strMM + strLastDay.padLeft(2, "0"));
-
- if(iv_msSundayPosition == "L") {
- nLDay = ufn_decode(nLDay,0,7,nLDay);
- } else{
- nLDay++;
- }
-
- var nLineCnt = parseInt((31 + (nFDay-1) + (7-nLDay)) / 7);
- var objDay,objWeek;
-
- var nSundayValue = 1;
- if(iv_msSundayPosition == "L") {
- nSundayValue = 0;
- } else {
- nSundayValue = 1;
- }
-
- // Initialize the day
- for(var i=1;i<=42;i++)
- {
- objDay = eval(oDiv.name + ".stcD" + i);
- objDay.style.background = "#f8f8f8";
- objDay.style.color = "";
- objDay.style.font = "Dotum,8";
- objDay.text = "";
- objDay.visible = true;
- objDay.DisableColor = objDay.Color;
- objDay.DisableBkColor = "#c2c2c2";
- }
-
- // Dummy
- for(var i=1;i<nFDay;i++)
- {
- objDay = eval(oDiv.name + ".stcD" + i);
- objDay.visible = true;
- }
-
- var strSvDate;
- var nCurLine = 0;
-
- for(var i=1;i<=nLastDay;i++)
- {
- objDay = eval(oDiv.name + ".stcD" + nFDay);
- objDay.text = i;
-
- // Today
- if(bCurMonth) {
- if(parseInt(ufn_getDate().substr(6,2)) == i) {
- objDay.style.background = "#c6e29a";
- }
- }
-
- // Fri/Sun
- var strI = new String(i);
- if(ufn_getDay(strYY + strMM + strI.padLeft(2, "0")) == 0) objDay.style.color = "#b50000";
- else if(ufn_getDay(strYY + strMM + strI.padLeft(2, "0")) == 6) objDay.style.color = "#008b9b";
-
- // Selected date
- if(parseInt(strDD) == i) {
- objDay.style.background = "#41aec4";
- objDay.style.color = "#ffffff";
- objDay.style.color = "#ffffff";
- objDay.style.font = "Tahoma,8,bold";
- }
-
- objDay.visible = true;
- nFDay++;
- }
-
- // Dummy
- var nDum;
- if(nFDay <= 29) {
- nDum = 28;
- } else if(nFDay <= 36) {
- nDum = 35;
- } else {
- nDum = 42;
- }
-
- for(var i=(nLastDay+1);i<=nDum;i++)
- {
- objDay = eval(oDiv.name + ".stcD" + i);
- objDay.visible = true;
- }
- }
- function fn_SetDay(sGb, sDate)
- {
- var oDiv;
- if(sGb == "F") oDiv = divFrom;
- else oDiv = divTo;
-
- strYY = sDate.substr(0,4);
- strMM = sDate.substr(4,2);
- strDD = sDate.substr(6,2);
-
- fn_SetCalendar(oDiv, strYY,strMM, strDD);
- }
- function fn_LastDateNum(sDate)
- {
- var nMonth, nLastDate;
- nMonth = parseInt(sDate.substr(4,2), 10);
- if( nMonth == 1 || nMonth == 3 || nMonth == 5 || nMonth == 7 || nMonth == 8 || nMonth == 10 || nMonth == 12 ){
- nLastDate = 31;
- }else if( nMonth == 2 ) {
- nLastDate = ufn_getMonthLastDay(sDate);
- }else{
- nLastDate = 30;
- }
-
- return nLastDate;
- }
- function fn_GetCurQDate(sDate)
- {
- var aRtnVal = new Array(2);
- var sYear = sDate.substr(0, 4);
- var sMon1, sMon2;
- var nMonth = parseInt(sDate.substr(4,2));
-
- if((nMonth >= 1) && (nMonth <= 3))
- {
- sMon1 = "01";
- sMon2 = "03";
- }
- else if((nMonth >= 4) && (nMonth <= 6))
- {
- sMon1 = "04";
- sMon2 = "06";
- }
- else if((nMonth >= 7) && (nMonth <= 9))
- {
- sMon1 = "07";
- sMon2 = "09";
- }
- else if((nMonth >= 10) && (nMonth <= 12))
- {
- sMon1 = "10";
- sMon2 = "12";
- }
-
- aRtnVal[0] = sYear + sMon1 + "01";
- aRtnVal[1] = sYear + sMon2 + fn_LastDateNum(sYear + sMon2 + "01");
- return aRtnVal;
- }
- /****************************************************************************************
- * Components : 날짜를 입력받아 요일 숫자를 반환
- * Argument : sDate 'yyyyMMdd'
- * return : 0 = Sunday ~ 6 = Saturday
- ****************************************************************************************/
- function ufn_getDay(sDate)
- {
- var date = new Date();
- date.setYear(String(sDate).substr(0, 4));
- date.setMonth(String(sDate).substr(4, 2) - 1);
- date.setDate(String(sDate).substr(6, 2));
- return date.getDay();
- }
- /****************************************************************************************
- * Components : Add Date
- * Argument : sDate 'yyyyMMdd'
- * nOffSet Increase/Decrease value
- * return : 'yyyyMMdd'
- ****************************************************************************************/
- function ufn_addDate(sDate, nOffSet)
- {
- var date = new Date();
-
- date.setYear(String(sDate).substr(0, 4));
- date.setMonth(String(sDate).substr(4, 2)-1);
- date.setDate(String(sDate).substr(6, 2)-(nOffSet*-1));
-
- return ufn_getDateToStr(date);
- }
- /****************************************************************************************
- * Description : Converted to a String Date Type
- * Argument : date date Type
- * return : yyyyMMdd
- ****************************************************************************************/
- function ufn_getDateToStr(date)
- {
- if(ufn_isNull(date)) return;
- var strYear = date.getYear().toString();
- var sMonth = (date.getMonth()+1).toString();
- var sDate = date.getDate().toString();
-
- if(strYear.length==2)
- strYear = '19'+strYear;
- else if(strYear.length==1)
- strYear = '190'+strYear;
-
- if(sMonth.length==1)
- sMonth = '0'+sMonth;
- if(sDate.length==1)
- sDate = '0'+sDate;
-
- return strYear+sMonth+sDate;
- }
- /****************************************************************************************
- * Description : Returns the current date.
- * Argument : none
- * return : yyyyMMdd
- ****************************************************************************************/
- function ufn_getDate() {
-
- var d = new Date();
- var s = d.getFullYear()
- + ((d.getMonth() + 1) + "").padLeft(2, '0')
- + (d.getDate() + "").padLeft(2, '0');
- return (s);
- }
- /****************************************************************************************
- * Description : Add Month
- * Argument : sMonth 'yyyyMM'
- * nOffSet Increase/Decrease value
- * return : 'yyyyMM'
- ****************************************************************************************/
- function ufn_addMonth(sMonth, nOffSet)
- {
- var date = new Date();
-
- date.setYear(String(sMonth).substr(0, 4));
- date.setMonth(String(sMonth).substr(4, 2)-1-(nOffSet*-1));
-
- return ufn_getDateToStr(date).substr(0, 6);
- }
- /****************************************************************************************
- * Description : Decode
- * Argument : none
- * return : decode
- ****************************************************************************************/
- function ufn_decode()
- {
- var varRtnValue = null;
- var arrArgument = ufn_decode.arguments;
- var varValue = arrArgument[0];
- var bIsDefault = false;
- var nCount = 0;
- if((arrArgument.length % 2) == 0) {
- nCount = arrArgument.length - 1;
- bIsDefault = true;
- } else {
- nCount = arrArgument.length;
- bIsDefault = false;
- }
- for(var i = 1; i < nCount; i+=2)
- {
- if(varValue == arrArgument[i]){
- varRtnValue = arrArgument[i+1];
- i = nCount;
- }
- }
- if(varRtnValue == null && bIsDefault){
- varRtnValue = arrArgument[arrArgument.length-1];
- }
- return varRtnValue;
- }
- /****************************************************************************************
- * Description : Compare the two dates.
- * Argument : sFormDate yyyyMMdd ex) "20120501"
- sToDate yyyyMMdd ex) "20120530"
- * @return
- * <p>1. The date is equal to two : return 0</p>
- * <p>2. sFormDate < sToDate : return -1</p>
- * <p>3. strFromDate > sToDate : return 1</p>
- * <p>4. Unless the date format : return null</p>
- ****************************************************************************************/
- function ufn_compareDate(sFormDate, sToDate)
- {
- var retVal;
- if (ufn_isDate(sFormDate) && ufn_isDate(sToDate)) {
- if (sFormDate == sToDate) {
- retVal = 0;
- } else if (sFormDate < sToDate) {
- retVal = -1;
- } else if (sFormDate > sToDate) {
- retVal = 1;
- }
- }
- return retVal;
- }
- /****************************************************************************************
- * Description : Last day of the month
- * Argument : sMonth 'yyyyMMdd'
- * return : 'yyyyMMdd'
- ****************************************************************************************/
- function ufn_getMonthLastDay(sMonth)
- {
- var iLastDay;
- var iYear = parseInt(String(sMonth).substr(0, 4),10) ;
- var iMonth = parseInt(String(sMonth).substr(4, 2),10);
- switch(iMonth)
- {
- case 2 :
- if( ((iYear%4)==0) && ((iYear%100)!=0) || ((iYear%400)==0) )
- iLastDay = 29;
- else
- iLastDay = 28;
- break;
- case 4 :
- case 6 :
- case 9 :
- case 11 :
- iLastDay = 30;
- break;
- default:
- iLastDay = 31;
- break;
- }
-
- return iLastDay;
- }]]></Script>
- </Form>
- </FDL>
|