Namespace: OpenEdge.Core
Class
TimeStamp
Parent classes:
Progress.Lang.Object

Inherits: Progress.Lang.Object

Copyright (c) 2013, 2016, 2018 by Progress Software Corporation. All rights reserved.
File:TimeStamp
Purpose:Primitive class for date, TimeStamp and TimeStamp-tz values
Author(s):pjudge
Created:Mon Nov 22 14:29:32 EST 2010
Notes:* Named 'TimeStamp' because of keyword/namespace conflicts with
ABL Primitive DATETIME. There's no built-in class for this.
/* (mandatory) The format of the data as passed into the constructor. One of DATE, DATETIME or DATETIME-TZ




Method Summary
Options Name Purpose
LOGICAL Equals (Object)
DATE ToABLDateFromISO (character) /** Converts an ISO date into an ABL DATE. The ISO-DATE() requires the session's date format to be YMD before performing the conversion; this method wraps that. @param character An ISO date @return datetime-tz The date value to convert. */
DATETIME ToABLDateTimeFromISO (character) /** Converts an ISO date into an ABL DATETIME. The ISO-DATE() requires the session's date format to be YMD before performing the conversion; this method wraps that. @param character An ISO date @return datetime The date value to convert. */
DATETIME-TZ ToABLDateTimeTzFromHttp (character) /** Converts an HTTP 'sane date' into an ABL DATETIME-TZ. The HTTP date is defined at http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3 One of the following formats will be used: Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format @param character An ISO date @return datetime-tz The date value to convert. */
DATETIME-TZ ToABLDateTimeTzFromISO (character) /** Converts an ISO date into an ABL DATETIME-TZ. The ISO-DATE() requires the session's date format to be YMD before performing the conversion; this method wraps that. @param character An ISO date @return datetime-tz The date value to convert. */
DATE ToDate () /* Converts the current TimeStamp to an ABL date value @return date The datetime-tz represented by this TimeStamp */
DATETIME ToDateTime () /* Converts the current TimeStamp to an ABL datetime value @return datetime The datetime represented by this TimeStamp */
DATETIME-TZ ToDateTimeTz () /* Converts the current TimeStamp to an ABL datetime-tz value @return datetime-tz The datetime-tz represented by this TimeStamp */
CHARACTER ToHttpDate () /** Converts this TimeStamp into an HTTP 'sane date', according to RFC 822, as defined at http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3 One of the following formats will be used: Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 @return datetime-tz The date value to convert. */
CHARACTER ToHttpDateFromABL (datetime-tz) /** Converts an ABL date into an HTTP 'sane date', according to RFC 822, as defined at http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3 One of the following formats will be used: Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 @param character An ISO date @return datetime-tz The date value to convert. */
CHARACTER ToISODate () /** Converts an ABL datetime into a correct ISO date. @return character An ISO date. */
CHARACTER ToISODateFromABL (date) /** Converts an ABL datetime into a correct ISO date. @param date The date value to convert @return character An ISO date. */
CHARACTER ToISODateFromABL (datetime) /** Converts an ABL datetime into a correct ISO date. @param datetime The date value to convert @return character An ISO date. */
CHARACTER ToISODateFromABL (datetime-tz) /** Converts an ABL datetime into a correct ISO date. @param datetime-tz The date value to convert @return character An ISO date. */
INTEGER ToTime () /* Returns the current TimeStamp's time in milliseconds since midnight. @return integer The milliseconds represented by this TimeStamp */

Constructor Summary
Options Name Purpose
TimeStamp () /* Default Constructor */
TimeStamp (character) /* Constructor @param character An ISO-DATE representation of a timestamp */
TimeStamp (date) /* Constructor @param date A timestamp. Timezone is inferred from the session */
TimeStamp (datetime) /* Constructor @param datetime A timestamp. Timezone is inferred from the session */
TimeStamp (datetime-tz) /* Constructor @param datetime-tz A 'complete' timestamp */

Property Summary
Options Name Purpose
CHARACTER Format


Method Detail
Top

LOGICAL Equals (Object)

Parameters:
p0 Progress.Lang.Object
Returns LOGICAL
Top

DATE ToABLDateFromISO (character)

Purpose: Converts an ISO date into an ABL DATE. The ISO-DATE()
requires the session's date format to be YMD before
performing the conversion; this method wraps that.
Parameters:
pcValue CHARACTER
Returns DATE
datetime-tz The date value to convert.
Top

DATETIME ToABLDateTimeFromISO (character)

Purpose: Converts an ISO date into an ABL DATETIME. The ISO-DATE()
requires the session's date format to be YMD before
performing the conversion; this method wraps that.
Parameters:
pcValue CHARACTER
Returns DATETIME
datetime The date value to convert.
Top

DATETIME-TZ ToABLDateTimeTzFromHttp (character)

Purpose: Converts an HTTP 'sane date' into an ABL DATETIME-TZ. The HTTP date is
defined at http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3
One of the following formats will be used:
Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
Parameters:
pcValue CHARACTER
Returns DATETIME-TZ
datetime-tz The date value to convert.
Top

DATETIME-TZ ToABLDateTimeTzFromISO (character)

Purpose: Converts an ISO date into an ABL DATETIME-TZ. The ISO-DATE()
requires the session's date format to be YMD before
performing the conversion; this method wraps that.
Parameters:
pcValue CHARACTER
Returns DATETIME-TZ
datetime-tz The date value to convert.
Top

DATE ToDate ()

/* Converts the current TimeStamp to an ABL date value
Returns DATE
date The datetime-tz represented by this TimeStamp
Top

DATETIME ToDateTime ()

/* Converts the current TimeStamp to an ABL datetime value
Returns DATETIME
datetime The datetime represented by this TimeStamp
Top

DATETIME-TZ ToDateTimeTz ()

/* Converts the current TimeStamp to an ABL datetime-tz value
Returns DATETIME-TZ
datetime-tz The datetime-tz represented by this TimeStamp
Top

CHARACTER ToHttpDate ()

Purpose: Converts this TimeStamp into an HTTP 'sane date', according to RFC 822, as
defined at http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3
One of the following formats will be used:
Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
Returns CHARACTER
datetime-tz The date value to convert.
Top

CHARACTER ToHttpDateFromABL (datetime-tz)

Purpose: Converts an ABL date into an HTTP 'sane date', according to RFC 822, as
defined at http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3
One of the following formats will be used:
Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
Parameters:
ptValue DATETIME-TZ
Returns CHARACTER
datetime-tz The date value to convert.
Top

CHARACTER ToISODate ()

Purpose: Converts an ABL datetime into a correct ISO date.
Returns CHARACTER
character An ISO date.
Top

CHARACTER ToISODateFromABL (date)

Purpose: Converts an ABL datetime into a correct ISO date.
Parameters:
ptValue DATE
Returns CHARACTER
character An ISO date.
Top

CHARACTER ToISODateFromABL (datetime)

Purpose: Converts an ABL datetime into a correct ISO date.
Parameters:
ptValue DATETIME
Returns CHARACTER
character An ISO date.
Top

CHARACTER ToISODateFromABL (datetime-tz)

Purpose: Converts an ABL datetime into a correct ISO date.
Parameters:
ptValue DATETIME-TZ
Returns CHARACTER
character An ISO date.
Top

INTEGER ToTime ()

/* Returns the current TimeStamp's time in milliseconds since midnight.
Returns INTEGER
integer The milliseconds represented by this TimeStamp


Constructor Detail
Top

TimeStamp ()

/* Default Constructor
Top

TimeStamp (character)

/* Constructor
Parameters:
pcTimeStamp CHARACTER
Top

TimeStamp (date)

/* Constructor
Parameters:
ptTimeStamp DATE
Top

TimeStamp (datetime)

/* Constructor
Parameters:
ptTimeStamp DATETIME
Top

TimeStamp (datetime-tz)

/* Constructor
Parameters:
ptTimeStamp DATETIME-TZ


Property Detail
Top

CHARACTER Format

Returns CHARACTER


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7.15