|
Class: TimePeriod
Object
|
+--TimePeriod
- Package:
- stx:libbasic
- Category:
- Kernel-Chronology
- Version:
- rev:
1.6
date: 2023/06/06 16:06:06
- user: cg
- file: TimePeriod.st directory: libbasic
- module: stx stc-classLibrary: libbasic
This class represents time periods defined by start and endtime.
It is used to represent ISO8601 timeperiods.
copyrightCOPYRIGHT (c) 2018 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.
instance creation
-
startTime: startTimeArg endTime: endTimeArg
-
ui support
-
iconInBrowserSymbol
-
the browser will use this as index into the toolbariconlibrary
accessing
-
endTime
-
-
endTime: aTimeOrDate
-
-
startTime
-
-
startTime: aTimeOrDate
-
-
startTime: startTimeArg endTime: endTimeArg
-
queries
-
duration
-
return the difference between end- and starttime
Usage example(s):
(TimePeriod startTime:(Date today) endTime:(Date tomorrow)) duration -> 1d
(TimePeriod startTime:(Time now) endTime:(Date tomorrow)) duration -> rest duration till tomorrow
(TimePeriod startTime:(Timestamp now) endTime:(Timestamp fromString:'2050-01-01')) duration
|
|p|
p := TimePeriod startTime:(Date today) endTime:(Date tomorrow).
p duration
|
|p|
p := TimePeriod startTime:(Time now) endTime:(Date tomorrow).
p duration
|
|p|
p := TimePeriod startTime:(Timestamp now) endTime:(Timestamp fromString:'2050-01-01').
p duration
|
|