LogoLogo
  • Internet Object 1.0
  • Internet Object
    • Abstract
    • The Poetic Principles of Internet Object
    • Objectives
    • Introducing Internet Object
  • The Structure
    • Internet Object Document
      • Header
      • Data Sections
    • Structural Elements
      • Structural Characters and Literals
      • Literals
      • Other Special Characters
      • Whitespaces
    • Values Representations
      • Objects
      • Arrays
      • Strings
        • Open Strings
        • Regular Strings
        • Raw Strings
      • Numeric Values
        • Number
        • BigInt
        • Decimal
        • Special Numeric Integer Formats
          • Hexadecimal
          • Octal
          • Binary
        • NaN and Infinity
      • Binary
      • Date and Time
      • Booleans
      • Nulls
    • Comments
    • Encoding
  • The Collections
    • Collection
    • Creating Collection
    • Collection Rules
    • Data Streaming
  • The Definitions
    • Definitions
    • Variables
    • Complex Schema
  • Schema Definition Language
    • Internet Object Schema
    • The structure
    • Data Types
      • Any
      • String
        • String Derived Types
          • Email
          • URL
          • Date
          • Time
          • DateTime
      • Number
        • Derived Types
          • int
          • byte
          • int16
          • int32
      • Object
      • Array
      • Bool
    • Dynamic Schema
    • Is Object, a MemberDef or a Schema?
  • Other
    • Best Practices
    • FAQs
    • Contributors
    • License
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. Schema Definition Language
  2. Data Types
  3. String
  4. String Derived Types

Time

PreviousDateNextDateTime

Last updated 4 years ago

Was this helpful?

Time can be represented as, HH:mm:ss.SSS or HHmmss.SSS i.e it can be passed with or without separators (: U+003A).

It uses a 24-hour clock system. Midnight is a special case and it may be referred to as "00:00" or "24:00". However, ISO 8601-1: 2019 no longer permits "24:00".

The Time Structure

Value

Description

Example

HH

24-hour clock hour, (00-23)

01

mm

Minutes, Decimal number (00-59)

46

ss

Seconds, Decimal number (00-59)

55

SSS

Milliseconds, three-digit decimal number (000-999)

500

Time with separators:

Time without Separators:

HH:mm:ss.SSS = 05:24:34.555

HHmmss.SSS = 052434.555

HH:mm:ss = 05:24:34

HHmmss = 052434

HH:mm = 05:24

HHmm = 0524

HH = 05

HH = 05

The code snippet demonstrates how to define and use time In the Internet Object Document.

# Set transactionTime with derived type as time
transactionTime: time
---
~ 05:24:34:555
~ 05:24:34      # parsed as 05:24:34:000
~ 05:24       # parsed as 05:24:00:000
~ 05         # parsed as 05:00:00:000

MemberDef

The Time is derived from the String type, hence it shares the same as the String. However, Time enforces additional constraints with the respective time format and the same is applicable to the Time MemberDef.

MemberDef