Re: [Flashcoders] How can we sum to dates???

2007-06-16 Thread jtgxbass

Just use flash's Date class and work with milliseconds...

var startDate = new Date(2007,0,14,11,30,0,0);
var duration = 50 * 60 * 1000; // in milliseconds
var endDate = new Date(startDate.getTime() + duration);




On 6/16/07, eka <[EMAIL PROTECTED]> wrote:


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  hh:nn:ss") ;
var sFinish:String   = end.format("MM dd  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  hh:nn:ss") ;
> var sFinish:String   = end.format("MM dd  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
> >
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > 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
> >
>
>
___
Flashcoders@chattyfig.figleaf.com
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


___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] How can we sum to dates???

2007-06-16 Thread eka

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  hh:nn:ss") ;
var sFinish:String   = end.format("MM dd  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  hh:nn:ss") ;
var sFinish:String   = end.format("MM dd  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
>
> ___
> Flashcoders@chattyfig.figleaf.com
> 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
>



___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] How can we sum to dates???

2007-06-15 Thread eka

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  hh:nn:ss") ;
var sFinish:String   = end.format("MM dd  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

___
Flashcoders@chattyfig.figleaf.com
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


___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] How can we sum to dates???

2007-06-15 Thread Amandeep Singh
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

___
Flashcoders@chattyfig.figleaf.com
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