Internet DRAFT - draft-thierry-bulk-time

draft-thierry-bulk-time






Network Working Group                                         P. Thierry
Internet-Draft                                      Thierry Technologies
Intended status: Experimental                             August 7, 2013
Expires: February 8, 2014


                          BULK Time namespace
                       draft-thierry-bulk-time-00

Abstract

   This specification describes a BULK serialization of time
   informations.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on February 8, 2014.

Copyright Notice

   Copyright (c) 2013 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.






Thierry                 Expires February 8, 2014                [Page 1]

Internet-Draft                  BULK-Time                    August 2013


Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 3
     1.1.  Conventions and Terminology . . . . . . . . . . . . . . . . 3
   2.  BULK Time namespace . . . . . . . . . . . . . . . . . . . . . . 3
     2.1.  Types . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
     2.2.  ISO 8601  . . . . . . . . . . . . . . . . . . . . . . . . . 3
       2.2.1.  Calendar date . . . . . . . . . . . . . . . . . . . . . 3
       2.2.2.  Week date . . . . . . . . . . . . . . . . . . . . . . . 4
       2.2.3.  Ordinale date . . . . . . . . . . . . . . . . . . . . . 4
       2.2.4.  Time of day . . . . . . . . . . . . . . . . . . . . . . 4
       2.2.5.  Point in time . . . . . . . . . . . . . . . . . . . . . 4
       2.2.6.  UTC time  . . . . . . . . . . . . . . . . . . . . . . . 4
       2.2.7.  Offset time . . . . . . . . . . . . . . . . . . . . . . 5
       2.2.8.  Durations . . . . . . . . . . . . . . . . . . . . . . . 5
       2.2.9.  Interval  . . . . . . . . . . . . . . . . . . . . . . . 5
       2.2.10. Repeating intervals . . . . . . . . . . . . . . . . . . 6
     2.3.  Julian date . . . . . . . . . . . . . . . . . . . . . . . . 6
     2.4.  Unix time . . . . . . . . . . . . . . . . . . . . . . . . . 6
     2.5.  Star Trek TNG stardate  . . . . . . . . . . . . . . . . . . 6
     2.6.  Anno Mundi  . . . . . . . . . . . . . . . . . . . . . . . . 6
     2.7.  Anno Hegirae  . . . . . . . . . . . . . . . . . . . . . . . 7
   3.  Security Considerations . . . . . . . . . . . . . . . . . . . . 7
   4.  References  . . . . . . . . . . . . . . . . . . . . . . . . . . 7
     4.1.  Normative References  . . . . . . . . . . . . . . . . . . . 7
     4.2.  Informative references  . . . . . . . . . . . . . . . . . . 7

























Thierry                 Expires February 8, 2014                [Page 2]

Internet-Draft                  BULK-Time                    August 2013


1.  Introduction

1.1.  Conventions and Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [RFC2119].

   Literal numerical values are provided in decimal or hexadecimal as
   appropriate.  Hexadecimal literals are prefixed with "0x" to
   distinguish them from decimal literals.

   BULK bytes sequences and expressions are described with the same
   conventions than used in the BULK 1.0 specification [BULK1]

2.  BULK Time namespace

   The time namespace is an official namespace identified by the UUID
   <urn:uuid:a0236aea-9923-511d-b755-66be75151201> (BULK, "Time passed,
   which, basically, is its job.").  It provides a standard way to
   serialize some formats used to express time, mainly those from ISO
   8601 [ISO8601].

2.1.  Types

   This specification defines the following types:

   Int123  a sequence of type "Int", "Int Int" or "Int Int Int"

   IntsF  a sequnce of one or more expressions, all of which MUST be of
      type "Int", except the last which can also be of type "Float"

2.2.  ISO 8601

   Note that BULK serializations of single points in time are notably
   bigger than a string containing their ISO 8601 notation.  Such times
   SHOULD be serialized as offsets against an epoch (like Julian date or
   Unix time), except where simplicity of implementation is wanted.

2.2.1.  Calendar date

   name  "0x1" (mnemonic: "calendar" )

   shape  "( calendar Int123 )"

   This serialize dates like 1999, 2001-06 or 2013-08-06.

   Types: "ISOTime", "Date"



Thierry                 Expires February 8, 2014                [Page 3]

Internet-Draft                  BULK-Time                    August 2013


2.2.2.  Week date

   name  "0x2" (mnemonic: "weekdate" )

   shape  "( weekdate Int123 )"

   This serialize dates like 1979, 1987-W06 or 2012-W52-1.

   Types: "ISOTime", "Date"

2.2.3.  Ordinale date

   name  "0x3" (mnemonic: "ordinal" )

   shape  "( ordinal Int Int )"

   This serialize dates like 2004-006 or 2000-366.

   Types: "ISOTime", "Date"

2.2.4.  Time of day

   name  "0x4" (mnemonic: "time-of-day" )

   shape  "( time-of-day {components}:IntsF )"

   This serialize times like 22, 13:45 or 06:34:57,3. {components} MUST
   contain from 1 to 3 expressions.

   Types: "ISOTime", "ISOTimeOfDay"

2.2.5.  Point in time

   name  "0x5" (mnemonic: "point" )

   shape  "( point Date ISOTimeOfDay )"

   This serialize dates like 2005-W34-7T19:45.

   Type: "ISOTime"

2.2.6.  UTC time

   name  "0x6" (mnemonic: "zulu" )







Thierry                 Expires February 8, 2014                [Page 4]

Internet-Draft                  BULK-Time                    August 2013


   shape  "( zulu ISOTime )"

   This serialize times like 2005-W34-7T19:45Z or 11:53:23Z.

   Type: "ISOTime"

2.2.7.  Offset time

   name  "0x7" (mnemonic: "offset" )

   shape  "( offset ISOTimeOfDay ISOTime )"

   This serialize times like 2005-W34-7T19:45+02 or 11:53-01:30.

   Type: "ISOTime"

2.2.8.  Durations

   0x8  "years"

   0x9  "months"

   0xA  "days"

   0xB  "hours"

   0xC  "minutes"

   0xD  "seconds"

   0xE  "weeks"

   All durations have the same shape: "( Ref {components}:IntsF )". {
   components} must contain from 1 to respectively 6, 5, 4, 3, 2, 1 and
   1 expressions.

   Type: "ISODuration"

2.2.9.  Interval

   name  "0xF" (mnemonic: "interval" )

   shape  "( interval ISOTime ISOTime )"

   shape  "( interval ISOTime ISODuration )"






Thierry                 Expires February 8, 2014                [Page 5]

Internet-Draft                  BULK-Time                    August 2013


   shape  "( interval ISODuration ISOTime )"

   shape  "( interval ISODuration )"

   Type: "Interval"

2.2.10.  Repeating intervals

   name  "0x10" (mnemonic: "repeat" )

   shape  "( interval Int Interval )"

   shape  "( interval Interval )"

2.3.  Julian date

   name  "0x11" (mnemonic: "julian" )

   shape  "( julian {num}:Number )"

   It serializes the Julian Day Number (if {num} has type Int) or the
   Julian Date (if {num} has type Float).

2.4.  Unix time

   name  "0x12" (mnemonic: "unix-time" )

   shape  "( unix-time Number )"

   It serializes the number of seconds since or until the Unix epoch
   (with microsecond or nanosecond precision if the number has type
   Float).

2.5.  Star Trek TNG stardate

   name  "0x13" (mnemonic: "tng-stardate" )

   shape  "( tng-stardate Int Int )"

   It serializes a stardate following the conventions of Star Trek: The
   Next Generation and following series.

2.6.  Anno Mundi








Thierry                 Expires February 8, 2014                [Page 6]

Internet-Draft                  BULK-Time                    August 2013


   name  "0x14" (mnemonic: "anno-mundi" )

   shape  "( anno-mundi Int123 )"

   It serializes a date in the hebrew calendar.

2.7.  Anno Hegirae

   name  "0x15" (mnemonic: "anno-hegirae" )

   shape  "( anno-hegirae Int123 )"

   It serializes a date in the islamic calendar.

3.  Security Considerations

4.  References

4.1.  Normative References

   [BULK1]    Thierry, P., "Binary Uniform Language Kit 1.0",
              draft-thierry-bulk-02 (work in progress), August 2013.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

4.2.  Informative references

   [ISO8601]  "ISO 8601:2004 Data elements and interchange formats --
              Information interchange -- Representation of dates and
              times", 2004.

Author's Address

   Pierre Thierry
   Thierry Technologies

   EMail: pierre@nothos.net













Thierry                 Expires February 8, 2014                [Page 7]