473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
http://perso.wanadoo.fr/jmrw/
Jul 23 '05 #1
4 5697
In article <ce**********@news-reader4.wanadoo.fr>, jm**@ifrance.com
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/Fas...herByCityState

--
--
~kaeli~
Practice safe eating - always use condiments.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2
*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.
--
Andrew Urquhart
- FAQ: www.jibbering.com/faq/
- Archive: www.google.com/groups?q=comp.lang.javascript
- Contact me: http://andrewu.co.uk/contact/
Jul 23 '05 #3
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)
Jul 23 '05 #4
On Thu, 5 Aug 2004 19:38:32 +0200, Eurydice wrote:
For a given town I search a javascript that gives the hour of the sunset and
the sunrise.
Has this become the obsession of some
demented French DHTML tutor?
http://perso.wanadoo.fr/jmrw/


<http://groups.google.com/groups?th=5a894252f86659af>
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
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

56
by: john bailo | last post by:
I just installed mono from ximian on my redHat 9 workstation and wrote a simple program from the interesting book ado.net in c# by Mahesh Chand. mono is fun ( is there ado for linux ? ...
2
by: j-marvin | last post by:
hi- according to ebay policy on javascript i cant eBay does not permit the use of the following types of JavaScript functions in your item listing: Scripts used to drop or read a cookie on...
2
by: Eurydice | last post by:
I would like to put a javascript code to obtain on my meteo page http://perso.wanadoo.fr/jmrw/Meteo/Meteo.shtml the time of the raise and the sunset of the sun according to the date. I have...
5
by: elsenraat_76 | last post by:
Hello! I was wondering if someone could help me out with a problem I'm having? I'm trying to input a javascript value into an anchor tag (from a function), but don't have an event to call the...
2
by: Georges Heinesch | last post by:
Hi. I need some VBA code to calculate sunrise and sunset for certain locations. Is there any know code for this (or library) or is there any site which is holding such formulas? The code...
1
by: Your Name | last post by:
I'm trying to use date_sunrise() and date_sunset() functions in my php5 code. I use them as follows: date_default_timezone_set("America/New_York"); $sr =...
1
by: Rob Szumlakowski | last post by:
Hi. I'm trying to determine what the expected Sunset Date for the official termination of support for the .NET 1.1 platform? When can we expect Microsoft to stop supporting .NET 1.1 and expect...
1
by: matty04 | last post by:
Hello. I'm working on a little javascript function that works in every browser but IE7. Page is at http://www.mnmwebworks.com/clients/sunrise/guides/ View the source to get the script. Any ideas?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.