Comunidad de diseño web y desarrollo en internet online

Manipulacion de fechas

Citar            
MensajeEscrito el 04 Nov 2005 11:58 pm
Hola mi problema es el siguiente,
tengo dos objetos de tipo Date y quiero taber cuantas, horas, dias, meses, años hay entre ellos.

intente restando cada propiedad cono el año, o los meses y me da un intervalo aproximado porque no tengo consideracion de los meses de 30, 31,17 o 28 dias segun si es año viciesto o no.

Por jvfacio

9 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 05 Nov 2005 12:06 am
Hola, no estoy segura pero depronto esto te puede servir

^^

Por Zarzamora

BOFH

3056 de clabLevel

3 tutoriales
12 articulos

 

firefox
Citar            
MensajeEscrito el 05 Nov 2005 12:38 am
getTime (Date.getTime method)
public getTime() : Number

Returns the number of milliseconds since midnight January 1, 1970, universal time, for the specified Date object. Use this method to represent a specific instant in time when comparing two or more Date objects.

Availability: ActionScript 1.0; Flash Player 5

Returns
Number - An integer.

Example
The following example uses the constructor to create a Date object based on the current time, and uses the getTime() method to return the number of milliseconds since midnight January 1, 1970:

var my_date:Date = new Date();
trace(my_date.getTime());



Eso te devuelve segundos, despues solo tendrias que pasarlo a horas/minutos/dias...

Por _CONEJO

BOFH

7639 de clabLevel

17 tutoriales
21 articulos

 

firefox
Citar            
MensajeEscrito el 07 Nov 2005 06:45 pm
GRACIA

Por jvfacio

9 de clabLevel



Genero:Masculino  

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.