time/timestamp-0.1.0#
Represents a single instance in time.
Description
String or integer representation of the timestamp in full ISO format.
Outline
Schema Definitions ¶
string
No length restrictionMust match the following pattern:
[0-9]{4}-(0[1-9])|(1[0-2])-(0[1-9])|([1-2][0-9])|(3[0-1])[T ]([0-1][0-9])|(2[0-4]):[0-5][0-9]:[0-5][0-9](.[0-9]+)?
Examples ¶
A timestamp representing the date 2020-01-01 12:00:00 (without timezone information):
!<asdf://weldx.bam.de/weldx/tags/time/timestamp-0.1.0> 2020-01-01T00:00:00
A timestamp representing the date 2020-01-01 12:00:00 in UTC time:
!<asdf://weldx.bam.de/weldx/tags/time/timestamp-0.1.0> 2020-01-01T12:00:00+00:00
A timestamp representing the date 2020-01-01 12:00:00 in CET time:
!<asdf://weldx.bam.de/weldx/tags/time/timestamp-0.1.0> 2020-01-01T12:00:00+01:00
Original Schema ¶
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "asdf://weldx.bam.de/weldx/schemas/time/timestamp-0.1.0"
title: |
Represents a single instance in time.
description: |
String or integer representation of the timestamp in full ISO format.
examples:
-
- A timestamp representing the date 2020-01-01 12:00:00 (without timezone information)
- |
!<asdf://weldx.bam.de/weldx/tags/time/timestamp-0.1.0> 2020-01-01T00:00:00
-
- A timestamp representing the date 2020-01-01 12:00:00 in UTC time
- |
!<asdf://weldx.bam.de/weldx/tags/time/timestamp-0.1.0> 2020-01-01T12:00:00+00:00
-
- A timestamp representing the date 2020-01-01 12:00:00 in CET time
- |
!<asdf://weldx.bam.de/weldx/tags/time/timestamp-0.1.0> 2020-01-01T12:00:00+01:00
type: string
pattern: "[0-9]{4}-(0[1-9])|(1[0-2])-(0[1-9])|([1-2][0-9])|(3[0-1])[T ]([0-1][0-9])|(2[0-4]):[0-5][0-9]:[0-5][0-9](.[0-9]+)?"# pattern string does not seem to work correctly.. ?
# the pattern is taken from asdf time but incomplete, still keep it for now
# maybe convert the following: https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/
...