Alessandro Lacava’s Blog

Google
 

October 24, 2007

Motore di ricerca per voli low-cost e hotel

Filed under: ~ Italiano ~, Altro — alessandrolacava @ 1:12 pm

Ciao,vi volevo segnalare un ottimo motore di ricerca per voli a basso costo e hotel. Il sito è: WeeFly.it

E’ un motore di ricerca, in stile Web 2.0, innovativo rispetto alla “massa” visto che consente di fare ricerche avanzate con una singola query. Ad esempio, è possibile selezionare diversi aeroporti di partenza e arrivo contemporaneamente.

Inoltre si possono fare ricerche del tipo: “Cerca il weekend più economico tra il 3 Novembre ed il 15 Dicembre con partenza Milano ed arrivo Londra o Parigi”.

E’ anche possibile personalizzare ancora di più la ricerca facendo ricerche del tipo: “Voglio partire o di giovedì o di venerdì e intendo stare minimo 3 giorni e massimo 5 giorni fuori nel mese di dicembre. Partenza da Roma ed arrivo Londra o Amsterdam”. Il motore si occupa di fare tutte le combinazioni e scartare quelle non desiderate. Tutto ciò è possibile utilizzando la “Ricerca Avanzata” in seconda pagina.

Spero possa esservi utile.


October 9, 2007

How to compute the timestamp in JavaScript

Filed under: Computer, JavaScript — alessandrolacava @ 1:20 pm

Many sources use the term timestamp to refer specifically to Unix time, the number of seconds since 00:00:00 UTC on January 1, 1970. In JavaScript you can use the built-in object Date to compute this timestamp. Here follows an example:

JavaScript:
  1. var ts = Date.UTC('2007', '09', '28') / 1000;
  2. alert(ts);

The previous code displays an alert with the number of seconds between 00:00:00 UTC on January 1, 1970 and 00:00:00 UTC on October 28, 2007.

How it works:

UTC is a static method of the Date object. The complete signature of this method is the following:

JavaScript:
  1. UTC(year, month, [day], [hours], [minutes], [seconds], [milliseconds])

Note that the parameters between square brackets are optional. The UTC method returns the number of milliseconds using UTC (Universal Time Coordinated). Hence the following code:

JavaScript:
  1. Date.UTC('2007', '09', '28') / 1000;

computes the number of seconds between 00:00:00 UTC on January 1, 1970 and 00:00:00 UTC on October 28, 2007. Note that the month parameter ranges from 0 (Jan) to 11 (Dec).


Next Page »