--- a/AbstractTime.st Tue Aug 02 10:53:01 2016 +0200
+++ b/AbstractTime.st Tue Aug 02 10:53:03 2016 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
@@ -260,8 +262,8 @@
^ Timestamp now utcSecondsSince1901
- "
- Timestamp primSecondsClock
+ "
+ Timestamp primSecondsClock
"
! !
@@ -302,7 +304,7 @@
fromSeconds:seconds
"return an instance that is constructed from seconds.
This method is only allowed for second values as returned by
- getSeconds, possibly adding/subtracting to that.
+ getSeconds, possibly adding/subtracting to that.
Never depend on any specific interpretation of the seconds,
since it depends on how the OperatingSystem counts time
(some start at 1900, others with 1970 ...)"
@@ -315,7 +317,7 @@
on others: dont know
(Timestamp day:1 month:1 year:1970 hour:1 minutes:0 seconds:0)
getSeconds on UNIX: returns 0
- on others: dont know
+ on others: don't know
"
"Modified: 1.7.1996 / 13:39:30 / cg"
@@ -1067,36 +1069,36 @@
%t seconds within hour (unpadded)
%T seconds from midNight (unpadded)
- %(milli1) milliseconds, truncated to 1/10th of a second 0..9
- %(milli2) milliseconds, truncated to 1/100th of a second 00..99 0-padded to length 2
+ %(milli1) milliseconds, truncated to 1/10th of a second 0..9
+ %(milli2) milliseconds, truncated to 1/100th of a second 00..99 0-padded to length 2
%(milli3) milliseconds, same as %i for convenience
Timestamp only:
- %(Day) - day - unpadded
- %(Month) - month - unpadded
+ %(Day) - day - unpadded
+ %(Month) - month - unpadded
%(yearOrTime) - year or time 5 digits as in unix-ls:
year if it is not the current year;
time otherwise
%(weekDay) - day in week (1->monday, 2->tuesday, ... ,7->sunday)
- %(dayName) - full day name
- %(DayName) - full day name, first character uppercase
- %(DAYNAME) - full day name, all uppercase
+ %(dayName) - full day name
+ %(DayName) - full day name, first character uppercase
+ %(DAYNAME) - full day name, all uppercase
- %(monthName) - full month name
- %(MonthName) - full month name, first character uppercase
- %(MONTHNAME) - full month name, all uppercase
+ %(monthName) - full month name
+ %(MonthName) - full month name, first character uppercase
+ %(MONTHNAME) - full month name, all uppercase
- %(shortDayName) - short (abbreviated) day name
- %(ShortDayName) - short (abbreviated) day name, first character uppercase
- %(SHORTDAYNAME) - short (abbreviated) day name, all uppercase
+ %(shortDayName) - short (abbreviated) day name
+ %(ShortDayName) - short (abbreviated) day name, first character uppercase
+ %(SHORTDAYNAME) - short (abbreviated) day name, all uppercase
- %(shortMonthName) - short (abbreviated) month name
- %(ShortMonthName) - short (abbreviated) month name, first character uppercase
- %(SHORTMONTHNAME) - short (abbreviated) month name, all uppercase
+ %(shortMonthName) - short (abbreviated) month name
+ %(ShortMonthName) - short (abbreviated) month name, first character uppercase
+ %(SHORTMONTHNAME) - short (abbreviated) month name, all uppercase
- %(nth) - counting day-in-month (1->'st'; 2->'nd'; 3->'rd'; 4...->'th')
- %(weekDayNth) - counting day-in-week (1->'st'; 2->'nd'; 3->'rd'; 4...->'th')
+ %(nth) - counting day-in-month (1->'st'; 2->'nd'; 3->'rd'; 4...->'th')
+ %(weekDayNth) - counting day-in-week (1->'st'; 2->'nd'; 3->'rd'; 4...->'th')
%(weekNth) - counting week-in-year (1->'st'; 2->'nd'; 3->'rd'; 4...->'th')
@@ -1105,29 +1107,29 @@
Year:
YYYY (eg 1997)
Date today printStringFormat:'%(year)'
- Timestamp now printStringFormat:'%(year)'
+ Timestamp now printStringFormat:'%(year)'
Year and month:
YYYY-MM (eg 1997-07)
- Date today printStringFormat:'%(year)-%(month)'
- Timestamp now printStringFormat:'%(year)-%(month)'
+ Date today printStringFormat:'%(year)-%(month)'
+ Timestamp now printStringFormat:'%(year)-%(month)'
Complete date:
YYYY-MM-DD (eg 1997-07-16)
- Date today printStringFormat:'%(year)-%(month)-%(day)'
- Timestamp now printStringFormat:'%(year)-%(month)-%(day)'
+ Date today printStringFormat:'%(year)-%(month)-%(day)'
+ Timestamp now printStringFormat:'%(year)-%(month)-%(day)'
Complete date plus hours and minutes:
YYYY-MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00)
- Timestamp now printStringFormat:'%(year)-%(month)-%(day)T%h:%m%(TZD)'
+ Timestamp now printStringFormat:'%(year)-%(month)-%(day)T%h:%m%(TZD)'
Complete date plus hours, minutes and seconds:
YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
- Timestamp now printStringFormat:'%(year)-%(month)-%(day)T%h:%m:%s%(TZD)'
+ Timestamp now printStringFormat:'%(year)-%(month)-%(day)T%h:%m:%s%(TZD)'
Complete date plus hours, minutes, seconds and a decimal fraction of a second
YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)
- Timestamp now printStringFormat:'%(year)-%(month)-%(day)T%h:%m:%s.%(milli2)%(TZD)'
+ Timestamp now printStringFormat:'%(year)-%(month)-%(day)T%h:%m:%s.%(milli2)%(TZD)'
"
@@ -1202,42 +1204,42 @@
%t seconds within hour (unpadded)
%T seconds from midNight (unpadded)
- %(TZD) timeZone delta of the receiver from UTC in the format +/-hh:mm
+ %(TZD) timeZone delta of the receiver from UTC in the format +/-hh:mm
- %(milli1) milliseconds, truncated to 1/10th of a second 0..9
- %(milli2) milliseconds, truncated to 1/100th of a second 00..99 0-padded to length 2
+ %(milli1) milliseconds, truncated to 1/10th of a second 0..9
+ %(milli2) milliseconds, truncated to 1/100th of a second 00..99 0-padded to length 2
%(milli3) milliseconds, same as %i for convenience
Timestamp only:
- %(Day) - day - unpadded
- %(Month) - month - unpadded
+ %(Day) - day - unpadded
+ %(Month) - month - unpadded
%(yearOrTime) - year or time 5 digits as in unix-ls:
year if it is not the current year;
time otherwise
%(weekDay) - day in week (1->monday, 2->tuesday, ... ,7->sunday)
- %(dayName) - full day name
- %(DayName) - full day name, first character uppercase
- %(DAYNAME) - full day name, all uppercase
+ %(dayName) - full day name
+ %(DayName) - full day name, first character uppercase
+ %(DAYNAME) - full day name, all uppercase
- %(monthName) - full month name
- %(MonthName) - full month name, first character uppercase
- %(MONTHNAME) - full month name, all uppercase
+ %(monthName) - full month name
+ %(MonthName) - full month name, first character uppercase
+ %(MONTHNAME) - full month name, all uppercase
- %(shortDayName) - short (abbreviated) day name
- %(ShortDayName) - short (abbreviated) day name, first character uppercase
- %(SHORTDAYNAME) - short (abbreviated) day name, all uppercase
+ %(shortDayName) - short (abbreviated) day name
+ %(ShortDayName) - short (abbreviated) day name, first character uppercase
+ %(SHORTDAYNAME) - short (abbreviated) day name, all uppercase
- %(shortMonthName) - short (abbreviated) month name
- %(ShortMonthName) - short (abbreviated) month name, first character uppercase
- %(SHORTMONTHNAME) - short (abbreviated) month name, all uppercase
+ %(shortMonthName) - short (abbreviated) month name
+ %(ShortMonthName) - short (abbreviated) month name, first character uppercase
+ %(SHORTMONTHNAME) - short (abbreviated) month name, all uppercase
- %(nth) - counting day-in-month (1->'st'; 2->'nd'; 3->'rd'; 4...->'th')
- %(weekDayNth) - counting day-in-week (1->'st'; 2->'nd'; 3->'rd'; 4...->'th')
+ %(nth) - counting day-in-month (1->'st'; 2->'nd'; 3->'rd'; 4...->'th')
+ %(weekDayNth) - counting day-in-week (1->'st'; 2->'nd'; 3->'rd'; 4...->'th')
%(weekNth) - counting week-in-year (1->'st'; 2->'nd'; 3->'rd'; 4...->'th')
- %(yearRoman) - year, in roman letters
- %(monthRoman) - month, in roman letters
+ %(yearRoman) - year, in roman letters
+ %(monthRoman) - month, in roman letters
The ISO8601 printString are generated with:
@@ -1245,29 +1247,29 @@
Year:
YYYY (eg 1997)
Date today printStringFormat:'%(year)'
- Timestamp now printStringFormat:'%(year)'
+ Timestamp now printStringFormat:'%(year)'
Year and month:
YYYY-MM (eg 1997-07)
- Date today printStringFormat:'%(year)-%(month)'
- Timestamp now printStringFormat:'%(year)-%(month)'
+ Date today printStringFormat:'%(year)-%(month)'
+ Timestamp now printStringFormat:'%(year)-%(month)'
Complete date:
YYYY-MM-DD (eg 1997-07-16)
- Date today printStringFormat:'%(year)-%(month)-%(day)'
- Timestamp now printStringFormat:'%(year)-%(month)-%(day)'
+ Date today printStringFormat:'%(year)-%(month)-%(day)'
+ Timestamp now printStringFormat:'%(year)-%(month)-%(day)'
Complete date plus hours and minutes:
YYYY-MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00)
- Timestamp now printStringFormat:'%(year)-%(month)-%(day)T%h:%m%(TZD)'
+ Timestamp now printStringFormat:'%(year)-%(month)-%(day)T%h:%m%(TZD)'
Complete date plus hours, minutes and seconds:
YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
- Timestamp now printStringFormat:'%(year)-%(month)-%(day)T%h:%m:%s%(TZD)'
+ Timestamp now printStringFormat:'%(year)-%(month)-%(day)T%h:%m:%s%(TZD)'
Complete date plus hours, minutes, seconds and a decimal fraction of a second
YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)
- Timestamp now printStringFormat:'%(year)-%(month)-%(day)T%h:%m:%s.%(milli2)%(TZD)'
+ Timestamp now printStringFormat:'%(year)-%(month)-%(day)T%h:%m:%s.%(milli2)%(TZD)'
"
@@ -1293,7 +1295,7 @@
] ifFalse:[
s := tzDelta < 0 ifTrue:[ '-' ] ifFalse:[ '+' ].
tzDelta := tzDelta abs.
- s := s , ((tzDelta // 60) printStringLeftPaddedTo:2 with:$0),
+ s := s , ((tzDelta // 60) printStringLeftPaddedTo:2 with:$0),
':' , ((tzDelta \\ 60) printStringLeftPaddedTo:2 with:$0).
].
aDictionary at:#TZD put:s