Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Timeline API

Reply
Thread Tools

Timeline API

 
 
jshanman
Guest
Posts: n/a
 
      04-26-2006
Matt Kruse wrote:
> jshanman wrote:
> > When it is completed, I will create a full set of documentation.

>
> Just my opinion - In order for something to be evaluated, a person needs to
> have some overview of what it's supposed to do and what problem it is
> intended to solve. Then, they need to know what features it is trying to
> implement to solve those problems and how they should attempt to use it.
>
> You don't need to write detailed API documentation at the beginning. But you
> should at least write some introductory text if you want to get any useful
> feedback from people.
>
> I visited your page, had no idea what I was looking at, and closed my
> browser. Thus, no response here
>
> --
> Matt Kruse
> http://www.JavascriptToolbox.com
> http://www.AjaxToolbox.com


You point is well taken. (as is the 24 hour previous point). I will
add some backgournd information about the project to the page. I'd be
happy if you were willing to look again!

Also, I've added a formatDate.js file and removed all those month & day
& hour arrays.

I've also fixed the IE drag issue by placing a return false in the
ondragstart and onselectstart attributes of the body tag.

- JS

 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      04-26-2006
jshanman wrote:

> I've also fixed the IE drag issue by placing a return false in the
> ondragstart and onselectstart attributes of the body tag.


The `body' _element_ has no such attributes in any HTML version, so your
markup is not Valid. It would be Valid and acceptable if you scripted
the corresponding properties instead, though.


PointedEars
--
But he had not that supreme gift of the artist, the knowledge of
when to stop.
-- Sherlock Holmes in Sir Arthur Conan Doyle's
"The Adventure of the Norwood Builder"
 
Reply With Quote
 
 
 
 
RobG
Guest
Posts: n/a
 
      04-26-2006
jshanman said on 26/04/2006 11:04 PM AEST:
> RobG wrote:

[...]
>
> When it is completed, I will create a full set of documentation.


If you don't have a clear idea of what you are trying to build, you
won't get a very good result. No one expects full documentation
up-front, but at this stage you should have documented a high-level view
of the purpose and basic functionality to be delivered.

Setting down your thoughts in a clear statement of functionality will
not only help you to organise your thoughts, but will allow you to
easily explain to others what is supposed to be going on.

You will also find many more people able to discuss your application
based on a simple description than if required to read and understand
hundreds of lines of code.


>>For example, you
>>have arrays of month names and day numbers that don't appear on the
>>page. Is that an error or isn't that functionality implemented yet?
>>

>
>
> It will be used to display the text labels, which is now partially
> implemented.


I didn't see any in any browser I tested (though I didn't test IE).


>>There are efficient ways of determining the number of days in the month
>>and adding the ordinal suffix (st, nd, rd, and so on) without creating
>>literal arrays with all of the values in them.
>>

>
> Link or example? that would be very useful. I will probably end up
> figuring out a differant way to do it.


I am presuming that you will only show a couple of dates at a time with
suffixes, they are normally only used when writing the date in full:

Thursday, 27th April, 2006.


There is a lot of stuff here:

<URL:http://www.merlyn.demon.co.uk/js-dates.htm>


There is a good thread on adding ordinal suffixes here (subject:
"Ordinal (st, nd, rd, th) dates in javascript")

<URL:
http://groups.google.co.uk/group/com...e1ef776161b7e4
>


[...]


--
Rob
Group FAQ: <URL:http://www.jibbering.com/FAQ>
 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      04-27-2006
Thomas 'PointedEars' Lahn said the following on 4/26/2006 3:29 PM:
> jshanman wrote:
>
>> I've also fixed the IE drag issue by placing a return false in the
>> ondragstart and onselectstart attributes of the body tag.

>
> The `body' _element_ has no such attributes in any HTML version, so your
> markup is not Valid.


So what? The browser that it is intended for supports it, it is not
needed in any other browser. That means it does *exactly* what it was
used to do. The fact that the W3C will burp and say "Hey, that isn't
valid HTML" is irrelevant. I would rather have a properly functioning
page than a broken page that is "valid HTML"

Too much, way too much, is made of being "Valid HTML" sometimes.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
 
Reply With Quote
 
jshanman
Guest
Posts: n/a
 
      04-27-2006

RobG wrote:
> jshanman said on 26/04/2006 11:04 PM AEST:
> > RobG wrote:

> [...]
> >
> > When it is completed, I will create a full set of documentation.

>
> If you don't have a clear idea of what you are trying to build, you
> won't get a very good result. No one expects full documentation
> up-front, but at this stage you should have documented a high-level view
> of the purpose and basic functionality to be delivered.
>
> Setting down your thoughts in a clear statement of functionality will
> not only help you to organise your thoughts, but will allow you to
> easily explain to others what is supposed to be going on.
>
> You will also find many more people able to discuss your application
> based on a simple description than if required to read and understand
> hundreds of lines of code.
>


I've create a statement of purpose on the site for the sake of
visitors. I already know exactly how I want it to work because I have
a working example: http://www.endeavorpub.com/wiki/map.php

However, this example is written using Google Maps APIv1 code.

>
> >>For example, you
> >>have arrays of month names and day numbers that don't appear on the
> >>page. Is that an error or isn't that functionality implemented yet?
> >>

> >
> >
> > It will be used to display the text labels, which is now partially
> > implemented.

>
> I didn't see any in any browser I tested (though I didn't test IE).
>


In Firefox 1.5 and IE6 it shows the text labels over the date interval
markers (years, months, days, or hours)

>
> >>There are efficient ways of determining the number of days in the month
> >>and adding the ordinal suffix (st, nd, rd, and so on) without creating
> >>literal arrays with all of the values in them.
> >>

> >
> > Link or example? that would be very useful. I will probably end up
> > figuring out a differant way to do it.

>
> I am presuming that you will only show a couple of dates at a time with
> suffixes, they are normally only used when writing the date in full:
>
> Thursday, 27th April, 2006.
>
>
> There is a lot of stuff here:
>
> <URL:http://www.merlyn.demon.co.uk/js-dates.htm>
>


Great site, Dr John Stockton helped me get this going originally using
Google Maps

>
> There is a good thread on adding ordinal suffixes here (subject:
> "Ordinal (st, nd, rd, th) dates in javascript")
>
> <URL:
> http://groups.google.co.uk/group/com...e1ef776161b7e4


I deceided to use this: http://www.svendtofte.com/code/date_format/
Which worked perfectly for my application
> >

>
> [...]
>
>
> --
> Rob
> Group FAQ: <URL:http://www.jibbering.com/FAQ>


any other suggestions, ideas or "feature requests" would be great!

- JS

 
Reply With Quote
 
Dr John Stockton
Guest
Posts: n/a
 
      04-27-2006
JRS: In article <(E-Mail Removed) .com>
, dated Wed, 26 Apr 2006 06:04:12 remote, seen in
news:comp.lang.javascript, jshanman <(E-Mail Removed)> posted
:
>> Why not:
>>
>> var D = new Date(year, month, day, hours);
>>

>
>Thise does not work for dates preceeding 100 AD, it would just return
>the milliseconds for "1901" instead of "01"AD
>


IIRC, it will work for most dates before 100 AD, though not for all of
them;
e.g. new Date(-999, 0, 1, 1) seems fine.

IIRC, new Date(1000, 12*Y+M-12001, D) will work for a sufficiently
wide year range.


If these are just civil dates, it will be more efficient to use the UTC
functions; and one should be aware that the non-UTC functions will apply
Summer Time for all years, even before the first use of Summer Time in
1915.


It might in the end be simpler to store dates as CJD or similar
(functions to convert to/from Julian/Gregorian are available via below)
and use Greg/Jul only for I/O.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
 
Reply With Quote
 
jshanman
Guest
Posts: n/a
 
      04-27-2006
Dr John Stockton wrote:
> JRS: In article <(E-Mail Removed) .com>
> , dated Wed, 26 Apr 2006 06:04:12 remote, seen in
> news:comp.lang.javascript, jshanman <(E-Mail Removed)> posted
> :
> >> Why not:
> >>
> >> var D = new Date(year, month, day, hours);
> >>

> >
> >Thise does not work for dates preceeding 100 AD, it would just return
> >the milliseconds for "1901" instead of "01"AD
> >

>
> IIRC, it will work for most dates before 100 AD, though not for all of
> them;
> e.g. new Date(-999, 0, 1, 1) seems fine.
>
> IIRC, new Date(1000, 12*Y+M-12001, D) will work for a sufficiently
> wide year range.
>
>
> If these are just civil dates, it will be more efficient to use the UTC
> functions; and one should be aware that the non-UTC functions will apply
> Summer Time for all years, even before the first use of Summer Time in
> 1915.
>


How would this make a differance for a program that plots out every
hour as a marker? Are you saying it would plot 25 hours in one day in
the spring, and plot 23 hours in one day in the fall? Are the UTC
functions actually *faster*?

>
> It might in the end be simpler to store dates as CJD or similar
> (functions to convert to/from Julian/Gregorian are available via below)
> and use Greg/Jul only for I/O.
>

I used several of your julian functions in my previous timeline and
will transfer them to this one as well...

CJD? is that Julian Day? Why would this be more efficient?

- JS

 
Reply With Quote
 
Dr John Stockton
Guest
Posts: n/a
 
      04-28-2006
JRS: In article <(E-Mail Removed) .com>
, dated Thu, 27 Apr 2006 13:50:10 remote, seen in
news:comp.lang.javascript, jshanman <(E-Mail Removed)> posted
:
>Dr John Stockton wrote:


>> If these are just civil dates, it will be more efficient to use the UTC
>> functions; and one should be aware that the non-UTC functions will apply
>> Summer Time for all years, even before the first use of Summer Time in
>> 1915.
>>

>
>How would this make a differance for a program that plots out every
>hour as a marker? Are you saying it would plot 25 hours in one day in
>the spring, and plot 23 hours in one day in the fall? Are the UTC
>functions actually *faster*?


If you want to plot *every hour*, in local civil time, then you MUST do
that 23/25 business. And the added/removed hour-of-year depends on year
and location. Note that, by specification, the Date Object has access
to only the *local* *current* Summer Time Rules, as held in the OS.

(And remember that the USA changed to Gregorian some hours UTC after
Britain did.)

The UTC functions are often faster than the corresponding non-UTC ones,
because they need to do less work. Algorithms using numbers rather than
a Date Object can be quicker still, where they avoid repeating work.


>> It might in the end be simpler to store dates as CJD or similar
>> (functions to convert to/from Julian/Gregorian are available via below)
>> and use Greg/Jul only for I/O.
>>

>I used several of your julian functions in my previous timeline and
>will transfer them to this one as well...
>
>CJD? is that Julian Day? Why would this be more efficient?


You need to have read the references provided in my previous signature
(repeated). CJD is Chronological Julian Date, changing at civil
midnight. Today is CJD 2453854, from inception at the eastmost zone
west of the Date Line to extinction at the westmost zone East of the
Line.

I wrote "simpler", which is not the same as "more efficient".


With Civil Time, you'll need to allow for such things as Alaska having
had (once) two Fridays in one week; and Sweden 1700-1753.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
 
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
Timeline for ASP.NET 2.0 dw ASP .Net 4 01-04-2005 01:08 PM
wmv in html page does not allow scanning the timeline davidshook HTML 7 11-03-2004 06:59 AM
[FYI] Trash Timeline Boomer Computer Support 4 04-17-2004 02:54 PM
MCSD Timeline Sean MCSD 2 10-14-2003 08:35 PM
OT: Google's 20 Year Usenet Timeline =?iso-8859-1?Q?Frisbee=AE_MCNGP?= MCSE 4 08-27-2003 09:48 PM



Advertisments