Javascript fot the sunrise and the sunset

Discussion in 'Javascript' started by Eurydice, Aug 5, 2004.

  1. Eurydice

    Eurydice Guest

    For a given town I search a javascript that gives the hour of the sunset and
    the sunrise.
    Looks simple but not found up to now on the net

    Thanks

    email : Dalip at ifrance.com
    http://perso.wanadoo.fr/jmrw/
     
    Eurydice, Aug 5, 2004
    #1
    1. Advertising

  2. Eurydice

    kaeli Guest

    In article <cetrao$o6k$>,
    enlightened us with...
    > For a given town I search a javascript that gives the hour of the sunset and
    > the sunrise.
    > Looks simple but not found up to now on the net
    >


    No, it's nothing close to simple.
    That's meteorological data that changes daily and would not be quite the same
    over years. If you actually had all that data in a database, you'd still need
    a server-side script to retrieve it (not client-side javascript).

    I'd look into a web service from a national agency that keeps track of these
    things or some other provider. My guess is that's where such data would
    normally come from (i.e. Excite.com's section that has such data). I would
    not attempt to keep such data in a DB myself unless the towns I kept track of
    numbered less than 10. Even then I'd probably go find it somewhere else.
    That'd be hell to keep updated.

    For example:
    http://ws2.serviceobjects.net/fw/FastWeather.asmx?op=GetWeatherByCityState

    --
    --
    ~kaeli~
    Practice safe eating - always use condiments.
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
     
    kaeli, Aug 5, 2004
    #2
    1. Advertising

  3. Eurydice

    Evertjan. Guest

    Andrew Urquhart wrote on 05 aug 2004 in comp.lang.javascript:

    > *Eurydice* wrote:
    >> For a given town I search a javascript that gives the hour of the
    >> sunset and the sunrise.
    >> Looks simple but not found up to now on the net

    >
    > Can't help you with the "placename to longitude and latitude" conversion
    > but you could convert Roger Sinnotts 'cheap and cheerful', 'tried and
    > tested' Sunup.bas to javascript yourself <URL:
    > http://skyandtelescope.com/resources/software/programs/sunup.bas> (info:
    > <URL: http://skyandtelescope.com/resources/software/article_326_1.asp>)
    > or I can dig out an old conversion I did myself that I have archived
    > away.


    Try this from Steve P. Morse:

    <http://www.stevemorse.org/jcal/sunrise.html>

    The javascripts are:
    city-us.js
    city-ca.js
    city-xx.js
    sunrise.js


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Aug 5, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. apurva
    Replies:
    1
    Views:
    831
    Ajeetha (www.noveldv.com)
    Feb 6, 2007
  2. Trent
    Replies:
    11
    Views:
    589
    Ron Natalie
    Jul 1, 2007
  3. harshu010
    Replies:
    0
    Views:
    303
    harshu010
    May 29, 2008
  4. Joe Joe
    Replies:
    11
    Views:
    244
    ara.t.howard
    Sep 19, 2007
  5. porter

    Javascript and IE? Javascript and C#?

    porter, Oct 5, 2007, in forum: Javascript
    Replies:
    6
    Views:
    332
    Thomas 'PointedEars' Lahn
    Oct 6, 2007
Loading...

Share This Page