You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Scott Matheson <sm...@intralinks.com> on 2014/12/14 22:49:09 UTC

Helping with date formatting

Hi
   I am having a bit of a challenge with date formate in AS3, i am looking to create a text string like


myPDF.addText("Tues, 21 October 2014",10,41);


i just cannot seem to follow the example on the web


can can any one give am an example ?


________________________________

Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.

Re: Helping with date formatting

Posted by Burhan Aksendir <bu...@gmail.com>.
Hi,

You should write:

var df:DateTimeFormatter = new DateTimeFormatter("en_US");
df.setDateTimePattern("EEEE, dd MMMM yyyy, h:mm");
trace(df.format(new Date()));



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Helping-with-date-formatting-tp9161p9179.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: Helping with date formatting

Posted by Scott Matheson <sm...@intralinks.com>.
Hi
   in an AS class I was unable to add this code, I had WARRNING ON df.dateTimePattern
________________________________________
From: Burhan Aksendir [burhanaksendir@gmail.com]
Sent: Sunday, December 14, 2014 10:10 PM
To: users@flex.apache.org
Subject: Re: Helping with date formatting

DateTimeFormatter
<http://help.adobe.com/tr_TR/FlashPlatform/reference/actionscript/3/spark/formatters/DateTimeFormatter.html>

var df:DateTimeFormatter = new DateTimeFormatter();
                                df.setStyle("locale","en-US");
                                df.dateTimePattern="EEEE, MMMM dd yyyy, h:mm";
                                df.dateStyle = "long";
                                var formattedDate:String = df.format(new Date().toString());



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Helping-with-date-formatting-tp9161p9162.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

________________________________

Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.

Re: Helping with date formatting

Posted by Burhan Aksendir <bu...@gmail.com>.
DateTimeFormatter
<http://help.adobe.com/tr_TR/FlashPlatform/reference/actionscript/3/spark/formatters/DateTimeFormatter.html>  

var df:DateTimeFormatter = new DateTimeFormatter();
				df.setStyle("locale","en-US");
				df.dateTimePattern="EEEE, MMMM dd yyyy, h:mm";
				df.dateStyle = "long";
				var formattedDate:String = df.format(new Date().toString());



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Helping-with-date-formatting-tp9161p9162.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.