ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE - IDEA: commandline/console program to calculate sunrise/sunset times

<< < (2/4) > >>

LuckMan212:
jazper- this is fantastic! I really appreciate you creating this program!! may I ask is it possible to make a few small changes?

1) the extra :00 (seconds) at the end seems to always be "00" at least in my testing.  Can this simply be dropped?  I do not need seconds calculated, minute resolution is enough. 

2) can the time be output in 24-hour (military) notation? so instead of 5:29PM can it just output 17:29 ?  If you prefer the 12hour notation then maybe add a switch like -24h or something to allow the user to choose which format to output.

3) is it possible to allow the program to calculate the sunrise/sunset times of any arbitrary date, not just Today's date?  example:
-suntime 40.73N 73.98W -time sunrise -date 10/30/05

also, is the program compensating for daylight savings? if yes, how does it know this? (does it read time zone from current user?)
sorry for all the questions thanks again!!! :D

jazper:
LuckMan212,
  As requested here is a new version...


--- ---SYNTAX: suntime.exe <latitude[N|S]> <longitude[E|W]> -time <sunrise|sunset|moonset|moonrise|twilight> [-24hr] [-date MM/DD/YYYY]


ADDED: Removed trailings seconds
ADDED: -date switch
ADDED: -24hr switch, if it exists, then output in 24hr time.

Download it here


jazper

LuckMan212:
jazper-

thank you so much, this program is now almost 100% perfect!! :Thmbsup:
only problem is now Daylight Savings Time.
I unfortunately live in New York which is one place that observe the daylight savings time.
Which sets clock back 1hr on Last Sunday in October and then sets clock forward 1hr on First Sunday in April.
Would it be possible to add a "-dst" switch to compensate for this factor if dates are falling between this range?

you can see the effect of this by looking at the following link, for example:
(just look what happens between October 29 and Oct 30...)
http://tinyurl.com/dwyvc


thank you so much!!

jazper:

--- ---ADDED: -dst switch, will compensate the output time for DST
   if -date is DST and currentdate is not, then +1 output
   else if -date is not DST and currentdate is DST then -1 output

FIXED: All cmd line switches are detected regardless of case(e.g. -date or -DATE)


Latest version HERE

LuckMan212:
wonderful!!  :D  :Thmbsup:
this is exactly what I needed, thank you so much!
now tell me how I can donate some $ for your efforts

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version