In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

forked from: 1桁の月や日を0Xの形に

Get Adobe Flash player
by bkzen 12 Feb 2011
    Embed
/**
 * Copyright bkzen ( http://wonderfl.net/user/bkzen )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/35Co
 */

// forked from zahir's 1桁の月や日を0Xの形に
package {
    import com.adobe.utils.DateUtil;
    import flash.text.TextField;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            var d:Date = new Date();
            (addChild( new TextField()) as TextField).text = 
                DateUtil.toW3CDTF(d).substr(0, 10).replace(/-/g, "");
        }
    }
}