Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #11368

Re: How can I use Operand (+ , - ) with Time

From Lew <noone@lewscanon.com>
Newsgroups comp.lang.java.programmer
Subject Re: How can I use Operand (+ , - ) with Time
Date 2012-01-15 15:39 -0800
Organization albasani.net
Message-ID <jevo2t$pr8$2@news.albasani.net> (permalink)
References <34afdd1f-4549-48a9-878c-8678993e97ed@t30g2000vbx.googlegroups.com> <operator-overloading-20120115135044@ram.dialup.fu-berlin.de> <jev61p$eh7$1@news.albasani.net> <jevbm7$14t$1@speranza.aioe.org>

Show all headers | View raw


glen herrmannsfeldt wrote:
> Lew wrote:
> (snip)
>> Why in the heck would you recommend 'double' as a time, date or interval type?
>>   It's very inappropriate.
>
> With an available 64 bit integer type, I agree.  Use long, not double.

That might work for intervals, but not dates or times.

'double' is just fine for intervals.  'long' is not at all fine for dates or 
times.  I outlined the reasons upthread, which apparently you ignored, but the 
bottom line is that you have to reinvent 'java.util.Calendar' if you use 
'long' to represent date/time types, and it's not typesafe.  Really bad idea.

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

How can I use Operand (+ , - )  with Time sahm <sahm007@gmail.com> - 2012-01-14 23:44 -0800
  Re: How can I use Operand (+ , - )  with Time Jeff Higgins <jeff@invalid.invalid> - 2012-01-15 08:32 -0500
    Re: How can I use Operand (+ , - )  with Time Jeff Higgins <jeff@invalid.invalid> - 2012-01-15 08:52 -0500
    Re: How can I use Operand (+ , - )  with Time Jeff Higgins <jeff@invalid.invalid> - 2012-01-15 10:19 -0500
      Re: How can I use Operand (+ , - ) with Time sahm <sahm007@gmail.com> - 2012-01-15 07:55 -0800
        Re: How can I use Operand (+ , - ) with Time Lew <noone@lewscanon.com> - 2012-01-15 10:50 -0800
  Re: How can I use Operand (+ , - )  with Time Roedy Green <see_website@mindprod.com.invalid> - 2012-01-15 08:35 -0800
  Re: How can I use Operand (+ , - ) with Time Lew <noone@lewscanon.com> - 2012-01-15 10:31 -0800
    Re: How can I use Operand (+ , - ) with Time Lew <noone@lewscanon.com> - 2012-01-15 10:51 -0800
    Re: How can I use Operand (+ , - ) with Time Jeff Higgins <jeff@invalid.invalid> - 2012-01-15 14:45 -0500
      Re: How can I use Operand (+ , - ) with Time Jeff Higgins <jeff@invalid.invalid> - 2012-01-15 15:53 -0500
      Re: How can I use Operand (+ , - ) with Time Lew <noone@lewscanon.com> - 2012-01-15 15:36 -0800
    Re: How can I use Operand (+ , - ) with Time glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-01-15 20:07 +0000
      Re: How can I use Operand (+ , - ) with Time Lew <noone@lewscanon.com> - 2012-01-15 15:39 -0800

csiph-web