;****************************************************************************
;* *
;* DATE2 *
;* Converts between a "mm/dd/yyyy" string and 2-byte packed format date *
;* *
;****************************************************************************
;Copyright (C) 1988 UltraSoft Corporation. All Rights Reserved.
;
;Written by: David Pallmann Freeware donated to AMUS
;
;Edit History:
;1.0(100) 14-Jul-88 created. /DFP
;1.0(101) 30-Nov-88 include XCALL offsets in-line. /DFP
;
;----------------------------------------------------------------------------
;
; This subroutine allows BASIC programs to store dates in 2-byte
; binary variables. DATE2.SBR converts in either direction between
; string and binary formats.
;
; The binary format used is:
;
; +---------------+---------------+
; |Y|Y|Y|Y|Y|Y|Y|M|M|M|M|D|D|D|D|D|
; +---------------+---------------+
;
; The string format used is:
;
; mm/dd/yy 07/16/1988
;
;
; Example of usage:
;
; MAP1 SDATE,S,10 ! string date
; MAP1 BDATE,B,2 ! binary date
;
; SDATE = "07/16/1988"
; XCALL DATE2, SDATE, BDATE ! convert string to binary
;
; BDATE = 45296
; XCALL DATE2, BDATE, SDATE ! convert binary to string
;
; Restrictions:
;
; Only valid dates between 1900 and 2027 may be stored.
;
;----------------------------------------------------------------------------
OBJNAM .SBR
VMAJOR=1
VMINOR=0
VSUB=0
VEDIT=101.
VWHO=0
ASMMSG "== Binary Date Subroutine =="
SEARCH SYS
SEARCH SYSSYM