χρόνος

Apollo 11 Lands On The Moon (in all Chronos Calendars)

The Chronos Code

| printPolicy eventDateAndTime |
printPolicy := 
	ChronosPrintPolicy applying: 
		#(useNumericMonthDesignator 
		showEraNameAfterDate 
		dateAndTimeSeparator: ' @ ' 
		timeOfDayPrefix: nil
		use12HourFormat 
		hourPadChar: nil 
		hideSubsecondFraction
		timeZoneSeparator: $ 
		timeZoneElementSeparator: nil 
		showStandardCalendarName).
eventDateAndTime 
	:= Timepoint 
		utYear: 1969 month: 7 day: 20 
		hour: 10 minute: 17 second: 40 
		timeZone: #'America/Chicago'.
Transcript cr.
eventDateAndTime inAllCalendars do: [:each | 
	Transcript cr; show: each % printPolicy].
printPolicy := 
	ChronosPrintPolicy applying: 
		#(useOrdinalDate 
		dateAndTimeSeparator: ' @ ' 
		timeOfDayPrefix: nil 
		hourPadChar: nil 
		use12HourFormat 
		hideSubsecondFraction 
		timeZoneSeparator: $  
		timeZoneElementSeparator: nil).
Transcript
	cr; show: (eventDateAndTime % printPolicy);
	show: ' ['; show: eventDateAndTime calendar name; show: '-ordinal date]'.
printPolicy := printPolicy apply: #(#useISOWeekOfYearDayOfWeek).
Transcript
	cr; show: (eventDateAndTime % printPolicy); show: ' [ISO]'.
printPolicy := printPolicy apply: #(#showDateAsJulianDay).
Transcript
	cr; show: (eventDateAndTime % printPolicy); show: ' [Julian Day]'.
Transcript
	cr; show: (eventDateAndTime - ChronosSystemClock st80Epoch) printString;
	show: ' days:hh:mm:ss.s.. since 1901-01-01T00:00:00Z (ST80 epoch)'.
Transcript
	cr; show: (eventDateAndTime secondsSince: ChronosSystemClock unixEpoch) printString;
	show: ' seconds since 1970-01-01T00:00:00Z (Unix epoch)'.
Transcript
	cr; 
	show: ((eventDateAndTime nanosecondsSince: ChronosSystemClock msWindowsNTEpoch) 
			// 100) printString;
	show: ' 100-nanosecond ticks since 1601-01-01T00:00:00Z (MS WIndows epoch)'.
SemanticDatePolicy default semanticKeysFor: eventDateAndTime do: [:semanticKey | 
	Transcript cr; tab; show: semanticKey.
	semanticKey == #weekend 
		ifTrue: 
			[Transcript 
				show: ' ('; 
				show: eventDateAndTime dayOfWeekName; 
				show: ')']].
Transcript cr

The Output

1969-07-20 AD @ 5:17:40 am -0500 [Gregorian]
0126-07-08 BE @ 5:17:40 am -0500 [Bahai]
1685-11-13 AM @ 5:17:40 am -0500 [Coptic]
1961-11-12 ZH @ 5:17:40 am -0500 [Ethiopic]
5729-05-05 AM @ 5:17:40 am -0500 [Hebrew]
1891-04-29 AS @ 5:17:40 am -0500 [Indian Civil]
1389-05-05 AH @ 5:17:40 am -0500 [Islamic (Fatimid)]
1969-07-07 AD @ 5:17:40 am -0500 [Julian]
2722-07-07 AUC @ 5:17:40 am -0500 [Julian (Imperial)]
1348-04-29 AP @ 5:17:40 am -0500 [Persian]
6205-07-29 SY @ 5:17:40 am -0500 [Solarian]
1969-201 @ 5:17:40 am -0500 [Gregorian-ordinal date]
1969-W29-7 @ 5:17:40 am -0500 [ISO]
J.D. 2440422 @ 5:17:40 am -0500 [Julian Day]
25037:10:17:40 days:hh:mm:ss.s.. since 1901-01-01T00:00:00Z (ST80 epoch)
-14218940 seconds since 1970-01-01T00:00:00Z (Unix epoch)
116302546600000000 100-nanosecond ticks since 1601-01-01T00:00:00Z (MS WIndows epoch)
	weekend (Sunday)

[Chronos] All code (classes and methods, and all associated documentation,) distributed as part of the Chronos Date/Time library are © Copyright 2005-2006 by Alan L. Lovejoy.  All Rights Reserved. Usage is controlled by the Chronos License (which is included in the distribution as the contents of the file {chronos-license.txt}, and is also available from the Chronos web site {http://www.chronos-st.org/License.html})

"Do not go gentle into that good night,
Old age should burn and rave at the close of the day;
Rage, rage at the dying of the light!" -- Dylan Thomas