Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: date + 90 days

Reply
Thread Tools

Re: date + 90 days

 
 
Roedy Green
Guest
Posts: n/a
 
      08-14-2003
On Thu, 14 Aug 2003 09:35:46 -0400, Thomas Gagné
<(E-Mail Removed)> wrote or quoted :

>>I have written a set of classes to computed dozens of possible
>>holidays. See http://mindprod.com/jgloss/holidaycalculator.html
>>

>
>Can you check that link? It seems broken.


try that gain http://mindprod.com/holidays.html

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
 
Thomas Weidenfeller
Guest
Posts: n/a
 
      08-15-2003
WB <(E-Mail Removed)> writes:
> I do too, except for storing the local time-zone. The JavaScript date


I will ignore the mentioning of JavaScr*pt for the moment

> object only returns the offset in minutes (which Calendar can "add" to
> the UTC to get the local time). How do you determine the TimeZone from
> the client?



I didn't express myself too clear. I have two applications that are
supposed to communicate with each other (online or offline). What I do
is to think in two categories:

Origin of the information which I want to mark/stamp with some time
information, and

Representation of that information, which can happen at a totally
different place.

At time and place of origin I use UTC-based time information. The
simplest in Java is to use Date.getTime() and store that long as-is. Or
you format the long using SimpleDateFormat and specify GMT as time zone
for the format (which looks better than the long when stored in log
files). Plus, I stor a textual(!) representation of the time zone name
of the place of origin. You get one with TimeZone.getDisplayName(). Of
course, you don't have to store that name for every time/date value,
but e.g. only once for a log file.

The time zone at place-of-origin is just for display purposes. Which
leads to the display of the data at some other place: I treat this as a
GUI issue (responsibility of the View in MVC terms). If necessary I can
display the information in any of the following three forms:

Local time at place of origin
Local time at place of display
UTC/GMT

/Thomas
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      08-15-2003
On Fri, 15 Aug 2003 20:09:58 GMT, WB <(E-Mail Removed)> wrote or
quoted :

>To know the Alberta user's time zone, I need to get the machines time
>zone. I can either ask the user to select it (via some option screen) or
>I can dynamically get it (for which I use JavaScript).


Can you explain why the default Applet timezone is not sufficient? Is
it just that Win users often don't configure their machines correctly?
What is JavaScript doing?

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date calculator, add or subtract days to or from a given date dlx_son@yahoo.com Javascript 8 06-26-2005 09:21 PM
Calculate the date after subtracting nmbr of days form a date Laery C Programming 11 02-25-2005 07:59 AM
Calculating days using Business Days for the Calendar David Stockwell Python 2 09-20-2004 09:58 PM
Re: Calculating days using Business Days for the Calendar Gerrit Python 0 09-20-2004 04:39 PM
Date, date date date.... Peter Grison Java 10 05-30-2004 01:20 PM



Advertisments