Loading ...
Sorry, an error occurred while loading the content.
 

Re: json date format 2006-12-03T13:56:21

Expand Messages
  • Douglas Crockford
    ... in json.js? You have the source, you can put them in any time you want to. But first, let me ask you a question: How confident that your system s clock has
    Message 1 of 12 , Jan 6, 2007
      > Douglas, is there a particular reason for not including milliseconds
      in json.js?

      You have the source, you can put them in any time you want to. But
      first, let me ask you a question: How confident that your system's
      clock has millisecond accuracy? And that the latency of the OS +
      Browser + JavaScript will not cause significant drift by the time it
      is delivered to your application? How meaningful will the milliseconds
      be when you put them on the wire and send them to your server, whose
      clock is not in sync with yours? Milliseconds are a waste of time.

      There are applications, such as video editing, where subsecond
      accuracy is important. If you have such an application, then you would
      want to tack on frames or fractional seconds. If you don't really need
      it, then it is better to not deceive yourself with false precision.
    • Peter Michaux
      ... I m sorry for bothering you, sir. Thank you for your answer. I ll go back to my corner now. Peter
      Message 2 of 12 , Jan 6, 2007
        On 1/6/07, Douglas Crockford <douglas@...> wrote:
        >
        > > Douglas, is there a particular reason for not including milliseconds
        > in json.js?
        >
        > You have the source, you can put them in any time you want to. But
        > first, let me ask you a question: How confident that your system's
        > clock has millisecond accuracy? And that the latency of the OS +
        > Browser + JavaScript will not cause significant drift by the time it
        > is delivered to your application? How meaningful will the milliseconds
        > be when you put them on the wire and send them to your server, whose
        > clock is not in sync with yours? Milliseconds are a waste of time.

        I'm sorry for bothering you, sir. Thank you for your answer. I'll go
        back to my corner now.

        Peter
      • Peter Michaux
        ... A date object is not necessarily constructed with no arguments sent to the Date constructor. It could very well be that in some applications the
        Message 3 of 12 , Jan 10, 2007
          On 1/6/07, Douglas Crockford <douglas@...> wrote:
          >
          > > Douglas, is there a particular reason for not including milliseconds
          > in json.js?
          >
          > You have the source, you can put them in any time you want to. But
          > first, let me ask you a question: How confident that your system's
          > clock has millisecond accuracy? And that the latency of the OS +
          > Browser + JavaScript will not cause significant drift by the time it
          > is delivered to your application? How meaningful will the milliseconds
          > be when you put them on the wire and send them to your server, whose
          > clock is not in sync with yours? Milliseconds are a waste of time.

          A date object is not necessarily constructed with no arguments sent to
          the Date constructor. It could very well be that in some applications
          the construction of the Date object could use date data from a user
          input which has very accurate and critical milliseconds information
          from another very accurate system.

          Peter
        • geoffreyk00
          ... milliseconds ... But ... system s ... time it ... milliseconds ... whose ... time. ... sent to ... applications ... The date object may be historical data
          Message 4 of 12 , Jan 11, 2007
            --- In json@yahoogroups.com, "Peter Michaux" <petermichaux@...>
            wrote:
            >
            > On 1/6/07, Douglas Crockford <douglas@...> wrote:
            > >
            > > > Douglas, is there a particular reason for not including
            milliseconds
            > > in json.js?
            > >
            > > You have the source, you can put them in any time you want to.
            But
            > > first, let me ask you a question: How confident that your
            system's
            > > clock has millisecond accuracy? And that the latency of the OS +
            > > Browser + JavaScript will not cause significant drift by the
            time it
            > > is delivered to your application? How meaningful will the
            milliseconds
            > > be when you put them on the wire and send them to your server,
            whose
            > > clock is not in sync with yours? Milliseconds are a waste of
            time.
            >
            > A date object is not necessarily constructed with no arguments
            sent to
            > the Date constructor. It could very well be that in some
            applications
            > the construction of the Date object could use date data from a user
            > input which has very accurate and critical milliseconds information
            > from another very accurate system.
            >
            > Peter
            >

            The date object may be historical data that truly is millisecond-
            accurate. The object does not have to be constructed when the
            dataset is created or by the server that is delivering the dataset.
            I more likely will have been created long before, with many date
            objects that do need this level of accuracy.

            I can see no reason to not to include milliseconds, and many reasons
            to keep them.
          Your message has been successfully submitted and would be delivered to recipients shortly.