Javascript fot the sunrise and the sunset

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eurydice

    #1

    Javascript fot the sunrise and the sunset

    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



  • kaeli

    #2
    Re: Javascript fot the sunrise and the sunset

    In article <cetrao$o6k$1@n ews-reader4.wanadoo .fr>, jmrw@ifrance.co m
    enlightened us with...[color=blue]
    > 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
    >[/color]

    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:


    --
    --
    ~kaeli~
    Practice safe eating - always use condiments.



    Comment

    • Andrew Urquhart

      #3
      Re: Javascript fot the sunrise and the sunset

      *Eurydice* wrote:[color=blue]
      > 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[/color]

      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.a sp>)
      or I can dig out an old conversion I did myself that I have archived
      away.
      --
      Andrew Urquhart
      - FAQ: www.jibbering.com/faq/
      - Archive: www.google.com/groups?q=comp.lang.javascript
      - Contact me: http://andrewu.co.uk/contact/


      Comment

      • Evertjan.

        #4
        Re: Javascript fot the sunrise and the sunset

        Andrew Urquhart wrote on 05 aug 2004 in comp.lang.javas cript:
        [color=blue]
        > *Eurydice* wrote:[color=green]
        >> 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[/color]
        >
        > 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.a sp>)
        > or I can dig out an old conversion I did myself that I have archived
        > away.[/color]

        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)

        Comment

        • Andrew Thompson

          #5
          Re: Javascript fot the sunrise and the sunset

          On Thu, 5 Aug 2004 19:38:32 +0200, Eurydice wrote:
          [color=blue]
          > For a given town I search a javascript that gives the hour of the sunset and
          > the sunrise.[/color]

          Has this become the obsession of some
          demented French DHTML tutor?
          [color=blue]
          > http://perso.wanadoo.fr/jmrw/[/color]

          <http://groups.google.c om/groups?th=5a894 252f86659af>
          A fellow Frenchman seems interested in the same script.
          ...Oh wait, that was you. Why did you repost?

          --
          Andrew Thompson
          http://www.PhySci.org/ Open-source software suite
          http://www.PhySci.org/codes/ Web & IT Help
          http://www.1point1C.org/ Science & Technology

          Comment

          Working...