[tap-l] TAP Datetime discussion
Michael G Schwern
schwern at pobox.com
Fri Sep 7 22:22:54 BST 2007
Eric Wilhelm wrote:
>> And the proposal is here:
>> http://testanything.org/wiki/index.php/TAP_datetime
>
> It's not clear from that what the intended usage of this datetime is.
> It sounds like:
>
> 1. TAP-level metadata (e.g. stream and test start/end times.)
> 2. TAP diagnostics.
Yep, you've got it.
> With #1, it's specified in the grammar. Thus, the producer and consumer
> have agreed in advance that a given key (e.g. "harness_start_time")
> will be in that format.
>
> But #2 is arbitrary user data. This means the datetime format has no
> meaning unless it is identified as such. The example demonstrates this
> weakness:
>
> not ok 1 - date of the par-tay
> ---
> found: 2007-09-01
> wanted: 2007-09-02
> ...
>
> That's fine if the recommendation pertains to #2 only in terms of making
> dates and times consistently readable for the user. But, as far as
> parsing is concerned, a datetime stored in an arbitrary key is only a
> string unless it is identified. If the #2 case intends to be more
> ambitious
It doesn't, not at this time. It's just establishing a suggestion for a
particularly common, contentious formatting issue. Since we need to do it for
the metadata information anyway, might as well throw it out there.
> some sort of typing is needed.
>
> !TAP::datetime 2007-09-01
>
> I doubt ^-- that is it. Maybe just a string "date(2007-09-01)" or
> whatever (or not.)
If we wanted to be ambitious we'd write an actual YAML type.
--
Stabbing you in the face so you don't have to.
More information about the tap-l
mailing list