Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] [OT] Subtracting two times in JavaScript



Dave M G wrote:
I've gone round and round trying to convert times back and forth from
Unix time, and using JavaScripts Date() functions which theoretically
allow you to subtract times directly...
The Date object is for representing a time and date, not an interval. Even if it works most of the time it may not give the expected result if the two times are on
either side of a DST limit.
I recommend using the method proposed by Godwin Stewart above. It makes much
more sense than trying to use Date as an interval.

My $.02
/Fredric
begin:vcard
fn:Fredric Fredricson
n:Fredricson;Fredric
org:Ln4 Solutions AB
email;internet:Fredric.Fredricson@example.com
title:CTO
tel;home:+46 8 91 64 39
tel;cell:+46 70 677 58 48
version:2.1
end:vcard


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links