Skip to content

I am ZTimestamp, a Magnitude, a point in time, an alternative to DateAndTime and TimeStamp

License

Notifications You must be signed in to change notification settings

Yesplan/ztimestamp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ZTimestamp

I am ZTimestamp.

I am a Magnitude.

I represent a point in time, a combination of a date and a time.

I am an alternative for DateAndTime and TimeStamp.
I have second precision and live in the UTC/GMT/Zulu timezone.
I use ISO/International conventions and protocols only.
I support some essential arithmetic.

I have an efficient internal representation:

jnd - the julian day number <SmallInteger>
secs - the number of seconds since midnight, the beginning of the day <SmallInteger>

Examples:

ZTimestamp now.
ZTimestamp fromString: '1969-07-20T20:17:40Z'.

There is some compatibility with existing, standard Chronology objects. I correctly parse representations with a timezone designator and can print a representation in arbitrary timezones.

(ZTimestamp fromString: DateAndTime now truncated printString) localPrintString.

Installation

This is a Pharo Smalltalk project using Monticello Filetree.

Sven Van Caekenberghe, April, 2012. MIT Licensed.

About

I am ZTimestamp, a Magnitude, a point in time, an alternative to DateAndTime and TimeStamp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Smalltalk 100.0%