|
Class: AbstractChronologyObject
Object
|
+--Magnitude
|
+--AbstractChronologyObject
|
+--AbstractTime
|
+--Date
- Package:
- stx:libbasic
- Category:
- Kernel-Chronology
- Version:
- rev:
1.9
date: 2024/04/18 14:22:42
- user: cg
- file: AbstractChronologyObject.st directory: libbasic
- module: stx stc-classLibrary: libbasic
This is an abstract class defining common methods for dates and time-like objects
copyrightCOPYRIGHT (c) 2023 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
change & update
-
update: something with: aParameter from: changedObject
-
just remember change for next access
general queries
-
abbreviatedDayNamesForLanguage: languageOrNilForDefault
-
return a collection of short month-names for a given language or the
current language if nil is given.
The returned strings depend on the resource translation file to be present for the
given language (i.e. libbasic/resources(<lang>.rs).
If not, english names are returned
Usage example(s):
self abbreviatedDayNamesForLanguage:#en
self abbreviatedDayNamesForLanguage:#de
self abbreviatedDayNamesForLanguage:#fr
self abbreviatedDayNamesForLanguage:#es
self abbreviatedDayNamesForLanguage:#zulu
self abbreviatedDayNamesForLanguage:nil
|
-
abbreviatedMonthNamesForLanguage: languageOrNilForDefault
-
return a collection of short month-names for a given language or the
current language if nil is given.
The returned strings depend on the resource translation file to be present for the
given language (i.e. libbasic/resources(<lang>.rs).
If not, english names are returned
Usage example(s):
self abbreviatedMonthNamesForLanguage:#en
self abbreviatedMonthNamesForLanguage:#de
self abbreviatedMonthNamesForLanguage:#fr
self abbreviatedMonthNamesForLanguage:#es
self abbreviatedMonthNamesForLanguage:#zulu
self abbreviatedMonthNamesForLanguage:nil
|
-
abbreviatedNameOfDay: dayIndex
-
given a day index (1..7),
return the abbreviated name of the day
for the current language setting
Usage example(s):
Date abbreviatedNameOfDay:4
|
-
abbreviatedNameOfDay: dayIndex language: langOrNilForDefault
-
given a day index (1..7),
return the abbreviated name of the day.
For nil, the current default language us used.
For unknown languages, english is used.
Usage example(s):
Date abbreviatedNameOfDay:4 language:#en
Date abbreviatedNameOfDay:4 language:#de
Date abbreviatedNameOfDay:4 language:#zulu
Date abbreviatedNameOfDay:4 language:nil
|
-
abbreviatedNameOfMonth: monthIndex
-
given a month index (1..12),
return the abbreviated name of the month
for the current language setting
Usage example(s):
Date abbreviatedNameOfMonth:11
Date abbreviatedNameOfMonth:12
|
-
abbreviatedNameOfMonth: monthIndex language: langOrNilForDefault
-
given a month index (1..12),
return the abbreviated name of the month.
For nil, the current default language us used.
For unknown languages, english is used.
Usage example(s):
Date abbreviatedNameOfMonth:11 language:#en
Date abbreviatedNameOfMonth:12 language:#en
Date abbreviatedNameOfMonth:12 language:#de
Date abbreviatedNameOfMonth:12 language:#fr
Date abbreviatedNameOfMonth:12 language:#zulu
Date abbreviatedNameOfMonth:12 language:nil
|
-
dayNamesForLanguage: languageOrNilForDefault
-
return a collection of day-names for a given language or the
current language if nil is given.
The returned strings depend on the resource translation file to be present for the
given language (i.e. libbasic/resources(<lang>.rs).
If not, english names are returned
Usage example(s):
self dayNamesForLanguage:#en
self dayNamesForLanguage:#de
self dayNamesForLanguage:#fr
self dayNamesForLanguage:#es
self dayNamesForLanguage:#zulu
self dayNamesForLanguage:nil
|
-
monthNamesForLanguage: languageOrNilForDefault
-
return a collection of month-names for a given language or the
current language if nil is given.
The returned strings depend on the resource translation file to be present for the
given language (i.e. libbasic/resources(<lang>.rs).
If not, english names are returned
Usage example(s):
self monthNamesForLanguage:#en
self monthNamesForLanguage:#de
self monthNamesForLanguage:#de_at
self monthNamesForLanguage:#fr
self monthNamesForLanguage:#es
self monthNamesForLanguage:#zulu
self monthNamesForLanguage:nil
|
-
nameOfDay: dayIndex
-
given a day index (1..7), return the name of the day
Usage example(s):
Date nameOfDay:1
Date nameOfDay:4
|
-
nameOfDay: dayIndex language: lang
-
given a day index (1..7), return the name of the day.
For nil, Smalltalk language is used,
for unknown languages, english is used.
Usage example(s):
Date nameOfDay:4 language:#en
|
-
nameOfMonth: monthIndex
-
given a month index (1..12), return the name of the month
Usage example(s):
Date nameOfMonth:11
Date nameOfMonth:12
Date nameOfMonth:4
|
-
nameOfMonth: monthIndex language: lang
-
given a month index (1..12), return the name of the month.
For nil, Smalltalk language is used,
for unknown languages, english is used.
Usage example(s):
Date nameOfMonth:11 language:#en
Date nameOfMonth:12 language:#en
Date nameOfMonth:4 language:#en
Date nameOfMonth:1 language:#de => 'Januar'
Date nameOfMonth:1 language:#de_de => 'Januar'
Date nameOfMonth:1 language:#de_at => 'Jänner'
|
initialization
-
initDefaultNames
-
read the language specific names.
Usage example(s):
-
initNames
-
read the language specific names.
Usage example(s):
-
initNamesForLanguage: language
-
read the language specific names.
Usage example(s):
Date initNamesForLanguage:#de.
Date initNamesForLanguage:#de_at.
Date initNamesForLanguage:#de_de.
Date initNamesForLanguage:#de_auto.
Date initNamesForLanguage:#en.
Date initNamesForLanguage:#en_en.
Date initNamesForLanguage:#en_au.
Date initNamesForLanguage:#fr.
Date initNamesForLanguage:#es.
|
-
initialize
-
Modified (comment): / 07-06-2023 / 10:43:03 / alkurz
-
resourcesForLanguage: language
-
guard for tinytalk (no libview)
instance creation
-
dateAndTimeNow
-
return an array filled with the current date and time.
As these provide no timezone info, this should be only used for user interface purposes.
See also: Date today / Time now / Timestamp now.
Usage example(s):
Time dateAndTimeNow
Date dateAndTimeNow
|
misc ui support
-
iconInBrowserSymbol
( an extension from the stx:libtool package )
-
the browser will use this as index into the toolbariconlibrary
queries
-
isAbstract
-
Return if this class is an abstract class.
True is returned here for myself only; false for subclasses.
Abstract subclasses must redefine this again.
Compatibility-ANSI
-
monthAbbreviation
-
return the month of the receiver as a string.
The returned string depends on the language setting.
Expect things like 'jan', 'feb' ...
Usage example(s):
Date today monthAbbreviation
|
Compatibility-Squeak
-
asDateAndTime
( an extension from the stx:libcompat package )
-
return an Timestamp instance, representing midnight of last night
Usage example(s):
private
-
additionalPicoseconds
-
return the additional picoseconds within the current second (0..999999999).
Here, assume that we have none
|