'From Squeak6.0alpha of 15 September 2020 [latest update: #19851] on 25 September 2020 at 5:26:17 pm'!

!Duration methodsFor: 'ansi protocol' stamp: 'ct 9/11/2020 15:29'!
days
	"Answer the number of days the receiver represents."

	^ seconds quo: SecondsInDay! !

!Duration methodsFor: 'ansi protocol' stamp: 'ct 9/11/2020 15:29'!
months

	^ self days quo: DaysInMonth average! !

!Duration methodsFor: 'ansi protocol' stamp: 'ct 9/11/2020 15:27'!
weeks

	^ self days quo: "DaysInWeek"7! !

!Duration methodsFor: 'ansi protocol' stamp: 'ct 9/11/2020 15:28'!
years

	^ self months quo: "MonthsInYear"12! !


!Integer methodsFor: 'printing' stamp: 'ct 9/25/2020 16:39'!
ordinalSuffix

	self \\ 100 = 10 ifFalse: [
		self \\ 10
			caseOf: {
				[1] -> [^ 'st'].
				[2] -> [^ 'nd'].
				[3] -> [^ 'rd'] }
			otherwise: []].
	^ 'st'! !

!Integer methodsFor: 'printing' stamp: 'ct 9/25/2020 16:40'!
printWithOrdinalSuffixOn: aStream

	aStream
		print: self;
		nextPutAll: self ordinalSuffix.! !

!Integer methodsFor: 'printing' stamp: 'ct 9/25/2020 16:41'!
withOrdinalSuffix

	^ String streamContents: [:stream |
		self printWithOrdinalSuffixOn: stream]! !


!SystemVersion methodsFor: 'birthdays' stamp: 'ct 9/25/2020 16:27'!
squeakAge

	^ Date today - self squeakBirthDate! !

!SystemVersion methodsFor: 'birthdays' stamp: 'ct 9/25/2020 16:27'!
squeakBirthDate

	^ Date year: 1996 month: 9 day: 24! !

!SystemVersion methodsFor: 'birthdays' stamp: 'ct 9/25/2020 16:27'!
squeakHasAnniversary

	| age |
	age := self squeakAge.
	^ age years \\ 10 = 0 or: [age years \\ 25 = 0]! !

!SystemVersion methodsFor: 'birthdays' stamp: 'ct 9/25/2020 16:27'!
squeakHasBirthday

	| birthDate today |
	birthDate := self squeakBirthDate.
	today := Date today.
	^ today monthIndex = birthDate monthIndex
		and: [today dayOfMonth = birthDate dayOfMonth]! !

!SystemVersion methodsFor: 'printing' stamp: 'ct 9/25/2020 16:21'!
basicDescription

	self isAlpha ifTrue: [^ 'ALPHA. New features which are not stable yet may come in\with each update. Also, existing features might not work reliably\due to updates and related changes.' translated withCRs].
	
	(self isFeatureFreeze and: [self isCodeFreeze not]) ifTrue: [^ 'FEATURE FREEZE. A new release is being prepared.\There will be only bugfixes, but no new features.' translated withCRs].
	
	self isCodeFreeze ifTrue: [^ 'RELEASE CANDIDATE. The new release is almost ready.\There will be only bugfixes, if any.' translated withCRs].
		
	self isRelease ifTrue: [^ ''].! !

!SystemVersion methodsFor: 'printing' stamp: 'ct 9/25/2020 16:49'!
description

	^ Text streamContents: [:description |
		description nextPutAll: self basicDescription .
		
		self squeakHasBirthday ifTrue: [
			description
				cr; cr;
				nextPutAll: ('<b>*** Happy Birthday Squeak!! ***</b><br />Squeak is getting {1} years old today. May you prosper in your best<br />and remain with us forever!! Best wishes from the community.' translated asTextFromHtml format: {
						self squeakAge years })].
		
		self squeakHasAnniversary ifTrue: [
			| age |
			age := self squeakAge.
			description
				cr; cr; 
				nextPutAll: ('<b>*** {2} Year of Squeak!! ***</b><br />We are celebrating {1} years of Squeak this year. Visit <br />{3} for more information.' translated asTextFromHtml format: {
					age years.
					age years withOrdinalSuffix.
					'https://squeak.org' asText addAttribute: (TextURL url: 'https://squeak.org')})] ]! !


!TextURL class methodsFor: 'instance creation' stamp: 'ct 9/12/2019 00:00'!
url: anUrl

	^ self new
		url: anUrl;
		yourself! !


!TextURL class reorganize!
('fileIn/Out' scanCharacter scanFrom:)
('instance creation' url:)
!

