Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to create 1 and 2 digit years?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Matthew Collins  
View profile  
 More options Nov 23 2011, 7:58 am
From: Matthew Collins <mcollinsem...@gmail.com>
Date: Wed, 23 Nov 2011 04:58:23 -0800 (PST)
Local: Wed, Nov 23 2011 7:58 am
Subject: How to create 1 and 2 digit years?
I''m trying to do a timeline for the Roman emperors and need to enter
dates and 2 digit years.  Any clues?

Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen Cooper  
View profile  
 More options Nov 13 2012, 9:29 am
From: Stephen Cooper <millipe...@gmail.com>
Date: Tue, 13 Nov 2012 06:29:13 -0800 (PST)
Local: Tues, Nov 13 2012 9:29 am
Subject: Re: How to create 1 and 2 digit years?

I know this is a stale post but having just come across this problem myself
it looks as if Timeline doesn't like any kind of precision with dates pre
100CE.

So an event with

start="Jan 1 0099 09:00:00 GMT"  

won't be displayed. But the same event with

start="99"  or start="99 AD"

will show up fine.

Just having the year is accurate enough for the timeline I'm working on
(also involving Romans...) so I've not investigated any further, but hope
that helps.

s.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Nosal  
View profile  
 More options Nov 13 2012, 11:00 am
From: Michael Nosal <mno...@mitre.org>
Date: Tue, 13 Nov 2012 11:00:05 -0500
Local: Tues, Nov 13 2012 11:00 am
Subject: Re: [Simile-Widgets] Re: How to create 1 and 2 digit years?

Time formats are a common problem to deal with. There are all kinds of problems dealing with ambiguities in non-standardized date formats, and many edge cases to consider. Browsers implement javascript date handlers in different ways. Most support RFC2822 / IETF date syntax:
"Mon, Dec 25 1995" or "25 Dec 1995" or "December 25, 1995".

RFC2822 allows assumptions about values (eg year is 'any numeric year 1900 or later') and specified (now obsolete) two digit years in the date field, and alphabetic time zone codes.

Web browsers try to be very forgiving in what they accept and parse as date/time strings, even if the string isn't exactly valid, the browser will take its best guess.

Many javascript date handling libraries will assume "0099" means the same as "99" and assume that is a two-digit abbreviation of 1999.

ISO8601 is another date format that is used, but native support in browsers varies across versions. Timeline supports it's own iso8601 parse routines.

Thus, the iso8601 format of this date would be:
"0099-01-01T09:00:00Z"

Timeline parses this correctly. You need to make sure that you specify 'dateTimeFormat': 'iso8601' in your date json. This will tell timeline to use the iso8601 date parser instead of the default gregorian parser.

var j = new Date();
Timeline.DateTime.setIso8601(j,"0099-01-01T09:00:00Z");
-> Date {Thu Jan 01 0099 04:00:00 GMT-0500 (EST)}

--Mike

On Nov 13, 2012, at 9:29 AM, Stephen Cooper wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »