Time_64

There are essentially two versions of time, 64 bit and 128 bit. The 64 bit can be embedded unchanged into the 128 bit. The 64 bit includes year, month, day, hour, minute, second, and day-of-week. The 128 bit includes the same as well as nanosecond, and timezone.

It is structured as individual 8 or 16 bit values within the 64 bit container of year, month, day, hour, minute and second.

It is ordered appropriately for big-endian and little-endian CPUs such that an integer compare does give a valid response for relative position or equality.

Each time part is a non-zero value when present. Therefore a 64 bit zero value indicates no time present.

This works for year as there is no year zero. Negative values up to -32727 do indicate a year BC.

For month and day zero is simply not present. A value can exceed the relative number of months or days, but is invalid.

For hour, minute, and second, one is added to the value. For example second 0 is stored as 1, and second 1 is stored as 2. This has to be adjusted before use. It does allow for a simple test for the presence of the time part.

Typically when a partial time is desired, such as year and month, the remaining values are zero.

It can be specified that year and day exist, but not month, but this may have little use.

Time_Date includes DayOfWeek since it is calculated from the data in the structure.

ShofarCoin™
Help Library

Core

Dev

Kind

Kit

Leaf

Map

Message

Net

Overview

Packet

Primitives

Run

Secure

Session

Site

Socket

Sprint

Stack

Tool

The Tree

Primitives

Belt

Bond

Branch

Build

Fact

File

Glob

ID

Image

Leaf

Log

Markup

Money

Object

Package

Parse

Phrase

Render

Sprint

Stack

String

Sum

SVG

Time

Tray

Unit

Verb

Time

Object

Date

Time

Format

Time_64

32

Time_128
Time