日本カレンダー

日本っぽいカレンダー。タイトルはどうやんだっけ。月年だし。

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">

    <mx:Script>
        <![CDATA[
            import mx.formatters.DateBase;

            DateBase.monthNamesLong = ["1月","2月","3月","4月","5月","6月",
            							"7月","8月","9月","10月","11月","12月"];
            DateBase.dayNamesLong = ["月曜日","火曜日","水曜日","木曜日","金曜日","土曜日","日曜日"];

            DateBase.dayNamesShort = ["月","火","水","木","金","土","日"];

            private function init():void {
                dateChooser.selectedDate = new Date();
                dateChooser.monthNames = DateBase.monthNamesLong;
                dateChooser.dayNames = DateBase.dayNamesShort;
            }
        ]]>
    </mx:Script>

    <mx:DateFormatter id="dateFormatter"
            formatString="YYYY年MM月DD日 EEEE"
             />

    <mx:ApplicationControlBar dock="true">
        <mx:Label id="lbl"
                text="{dateFormatter.format(dateChooser.selectedDate)}"
                textAlign="center"
                fontSize="24"
                selectable="true"
                width="100%" />
    </mx:ApplicationControlBar>

    <mx:DateChooser id="dateChooser"
    		firstDayOfWeek="6"
            creationComplete="init();" />

</mx:Application>


Using the DateBase class in Flex
http://blog.flexexamples.com/2007/12/11/using-the-datebase-class-in-flex/