{"id":1772,"date":"2012-10-04T01:08:15","date_gmt":"2012-10-04T01:08:15","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=1772"},"modified":"2017-01-27T15:05:07","modified_gmt":"2017-01-27T06:05:07","slug":"actionscript-%eb%82%a0%ec%a7%9c%eb%a1%9c-%ec%9a%94%ec%9d%bc-%ea%b3%84%ec%82%b0%ed%95%98%ea%b8%b0","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=1772","title":{"rendered":"[ActionScript] \ub0a0\uc9dc\ub85c \uc694\uc77c \uacc4\uc0b0\ud558\uae30"},"content":{"rendered":"<p>\uc544\ub798\uc758 getDay \ud568\uc218\ub294 \uc561\uc158\uc2a4\ud06c\ub9bd\ud2b8\ub85c \uad6c\uc131\ub41c \uc694\uc77c\uc744 \uacc4\uc0b0\ud574 \ubc18\ud658\ud558\ub294 \ud568\uc218\uc785\ub2c8\ub2e4. \uc774 getDay \ud568\uc218\uc758 \ud30c\ub77c\uba54\ud130\ub294 \ub0a0\uc9dc\ub85c\uc368 \ub144(\uc608:2012), \uc6d4(1 ~ 12), \uc77c(1 ~ 31)\uc785\ub2c8\ub2e4.<\/p>\n<pre>private function getDay(year:int, month:int, day:int):String\r\n{\r\n    const dayStrings:Object = {\r\n        0:\"\uc77c\uc694\uc77c\",\r\n        1:\"\uc6d4\uc694\uc77c\",\r\n        2:\"\ud654\uc694\uc77c\",\r\n        3:\"\uc218\uc694\uc77c\",\r\n        4:\"\ubaa9\uc694\uc77c\",\r\n        5:\"\uae08\uc694\uc77c\",\r\n        6:\"\ud1a0\uc694\uc77c\"\r\n    };\r\n    \r\n    if (month == 1 || month == 2) year--;\r\n    month = (month + 9) % 12 + 1;\r\n    var y:int = year % 100;\r\n    var century:int = year \/ 100;\r\n    var week:int = ((13 * month - 1) \/ 5 \r\n        + day + y + y \/ 4 + century \/ 4 - 2 * century) % 7;\r\n    if (week < 0) week = (week + 7) % 7;\r\n\r\n    return dayStrings[week];\r\n}<\/pre>\n<p>\uc774\ucc98\ub7fc \ub0a0\uc9dc\ub85c\ubd80\ud130 \uc694\uc77c\uc744 \uacc4\uc0b0\ud558\ub294 \ud568\uc218\ub97c \uc9c1\uc811 \uc791\uc131\ud574 \uc0ac\uc6a9\ud560 \uc218 \uc788\uc9c0\ub9cc \ub2e4\uc74c\ucc98\ub7fc \uc561\uc158\uc2a4\ud06c\ub9bd\ud2b8\uc5d0\uc11c \uc774\ubbf8 \uc81c\uacf5\ud558\uace0 \uc788\ub294 Date \ud074\ub798\uc2a4\ub97c \uc0ac\uc6a9\ud574 \ubcf4\ub2e4 \uac04\ub2e8\ud788 \uc694\uc77c\uc744 \uacc4\uc0b0\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre> const dayStrings:Object = {\r\n        0:\"\uc77c\uc694\uc77c\",\r\n        1:\"\uc6d4\uc694\uc77c\",\r\n        2:\"\ud654\uc694\uc77c\",\r\n        3:\"\uc218\uc694\uc77c\",\r\n        4:\"\ubaa9\uc694\uc77c\",\r\n        5:\"\uae08\uc694\uc77c\",\r\n        6:\"\ud1a0\uc694\uc77c\"\r\n    };\r\n     \r\n    var d:Date = new Date(2012, 10-1, 4);\r\n    Alert.show(dayStrings[d.day]);<\/pre>\n<p>\uc5ec\uae30\uc11c \uc8fc\uc758\ud574\uc57c\ud560 \uc810\uc740 <strong><font color=\"#d41a01\">\uc6d4(Month)\uc740 1\ubd80\ud130 \uc2dc\uc791\ud558\uc9c0 \uc54a\uace0 0\ubd80\ud130 \uc2dc\uc791<\/font><\/strong>\ud55c\ub2e4\ub294 \uac83\uc785\ub2c8\ub2e4. \uadf8\ub798\uc11c 11\ubc88 \ucf54\ub4dc\uc5d0\uc11c \uc9c0\uc815\ud55c (10-1)\uc740 9\uc6d4\uc774 \uc544\ub2c8\ub77c 10\uc6d4\uc744 \uc758\ubbf8\ud569\ub2c8\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc544\ub798\uc758 getDay \ud568\uc218\ub294 \uc561\uc158\uc2a4\ud06c\ub9bd\ud2b8\ub85c \uad6c\uc131\ub41c \uc694\uc77c\uc744 \uacc4\uc0b0\ud574 \ubc18\ud658\ud558\ub294 \ud568\uc218\uc785\ub2c8\ub2e4. \uc774 getDay \ud568\uc218\uc758 \ud30c\ub77c\uba54\ud130\ub294 \ub0a0\uc9dc\ub85c\uc368 \ub144(\uc608:2012), \uc6d4(1 ~ 12), \uc77c(1 ~ 31)\uc785\ub2c8\ub2e4. private function getDay(year:int, month:int, day:int):String { const dayStrings:Object = { 0:&#8221;\uc77c\uc694\uc77c&#8221;, 1:&#8221;\uc6d4\uc694\uc77c&#8221;, 2:&#8221;\ud654\uc694\uc77c&#8221;, 3:&#8221;\uc218\uc694\uc77c&#8221;, 4:&#8221;\ubaa9\uc694\uc77c&#8221;, 5:&#8221;\uae08\uc694\uc77c&#8221;, 6:&#8221;\ud1a0\uc694\uc77c&#8221; }; if (month == 1 || month == 2) year&#8211;; month = (month + 9) % 12 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=1772\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;[ActionScript] \ub0a0\uc9dc\ub85c \uc694\uc77c \uacc4\uc0b0\ud558\uae30&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63],"tags":[],"class_list":["post-1772","post","type-post","status-publish","format-standard","hentry","category-actionscript"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1772"}],"version-history":[{"count":1,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1772\/revisions"}],"predecessor-version":[{"id":3026,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1772\/revisions\/3026"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1772"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}