views:

31

answers:

2

I'm working on a DSL that should support a time literal and am interested in two different things:

  1. What language(s) or DSL(s) support a time literal?
  2. How is the literal structured?

I'm leaning towards using the following regular expression, extracted from the XSD for XML Schema itself, for identifying a time literal:

T\d\d:\d\d:\d\d[+\-]\d\d:\d\d

But, despite that inclination, I haven't been able to find a common practice.

+2  A: 

Use formats from ISO 8601 as appropriate:

Roger Pate
+1  A: 

Two non iso-8601 answers:

  1. Emacs lisp has pretty sophisticated treatment of time and date;
  2. Likewise Frink.
Charles Stewart