Hello :)

i have update my SVN repository and add a new feature in the static "add"
method of the Calendar class :

import asgard.date.Calendar ;

var begin:Calendar = new Calendar( 2007, 5 , 14, 11, 30, 0 ) ;

var duration:Number = 50 ;

var end:Calendar = Calendar.add( begin, Calendar.MINUTE , 50 ) ;

var sBegin:String = begin.format("MM dd yyyy hh:nn:ss") ;
var sFinish:String   = end.format("MM dd yyyy hh:nn:ss") ;

trace( "start  : " + sBegin ) ;
trace( "finish : " + sFinish ) ;

It's more easy now ;)

EKA+ :)

2007/6/16, eka <[EMAIL PROTECTED]>:

Hello :)

if you have 2 minutes :

1 - install VEGAS my opensource framework and this extensions :

- page project : http://code.google.com/p/vegas/
- install VEGAS : http://code.google.com/p/vegas/wiki/InstallVEGASwithSVN

2 - Use the Calendar and the Time class in the asgard package :

asgard.date.Calendar :
http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/asgard/date/Calendar.as
asgard.date.Time       :
http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/asgard/date/Time.as


Example :
import asgard.date.Calendar ;
import asgard.date.Time ;

var begin:Calendar = new Calendar( 2007, 5 , 14, 11, 30, 0 ) ;

var duration:Number = 50 * Time.MINUTE ; // in milliseconds

var end:Calendar = new Calendar( begin.valueOf() + duration ) ;

var sBegin:String = begin.format("MM dd yyyy hh:nn:ss") ;
var sFinish:String   = end.format("MM dd yyyy hh:nn:ss") ;

trace( "start  : " + sBegin ) ; // start  : Jun 14 2007 11:30:00
trace( "finish : " + sFinish ) ; // finish : Jun 14 2007 12:20:00


EKA+ :)



var end:Calendar = Calendar.add( begin , Calendar.MINUTES


2007/6/16, Amandeep Singh <[EMAIL PROTECTED]>:
>
> Hi everyone,
>
> I got stuck in a problem. What i need is to sum to dates.
>
> Let say there is an event that starts at Jun 14 2007 11:30:00. The
> duration
> of the event is 50 min. That means the end time will be Jun 14 2007
> 12:20:00.
>
> Now what i need is to sum the start time and the duration to get the end
> time.
>
> Anyone who know how to do this please let me know. I will be very
> thankful.
>
> Thanks in Advance.
>
> Regards,
> Amandeep
>
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to