(DEFINE-FILE-INFO READTABLE "INTERLISP" PACKAGE "INTERLISP" BASE 10)
(FILECREATED "24-Sep-87 14:22:44" 
|{FIREFS:CS:UNIV ROCHESTER}<KOOMEN>LISPUSERS>LYRIC>DATEFORMAT-EDITOR.;1| 26013  

      changes to%:  (VARS DATEFORMAT-EDITORCOMS $$DATEFORMAT-EDITOR-ITEMS)
                    (FNS EDIT-DATEFORMAT GET-DATEFORMAT-EDITOR DATEFORMAT-EDITOR-GET-STATE 
                         DATEFORMAT-EDITOR-PUT-STATE)

      previous date%: "20-Feb-87 01:37:19" 
|{FIREFS:CS:UNIV ROCHESTER}<KOOMEN>LISPUSERS>KOTO>DATEFORMAT-EDITOR.;1|)


(* "
Copyright (c) 1987 by Johannes A. G. M. Koomen.  All rights reserved.
")

(PRETTYCOMPRINT DATEFORMAT-EDITORCOMS)

(RPAQQ DATEFORMAT-EDITORCOMS [

(* ;;; "This system provides a facility for editing date formats as described in section 12.5 of the Interlisp-D manual, Koto version.  User entry point is the function EDIT-DATEFORMAT.  Editing is accomplished using a FREEMENU.  Items displayed in this menu are stored on DATEFORMAT-EDITOR-ITEMS.  Call (GET-DATEFORMAT-EDITOR T) after changing this variable.  Input to EDIT-DATEFORMAT is either NIL or a value returned by the DATEFORMAT function.  Output is either NIL -- in case editing was aborted -- or another value as returned from the DATEFORMAT function.")

                              

(* ;;; "Interface")

                              (FNS EDIT-DATEFORMAT GET-DATEFORMAT-EDITOR)
                              

(* ;;; "Support")

                              (FILES (SYSLOAD)
                                     FREEMENU)
                              (PROP MAkEFILE-ENVIRONMENT DATEFORMAT-EDITOR)
                              (FNS DATEFORMAT-EDITOR-STATUS DATEFORMAT-EDITOR-GET-STATE 
                                   DATEFORMAT-EDITOR-PUT-STATE DATEFORMAT-EDITOR-ABORTFN 
                                   DATEFORMAT-EDITOR-CLOSEFN DATEFORMAT-EDITOR-QUITFN)
                              [COMS 
          
          (* ;; "Redefine \OUTDATE in the system file IOCHARS to add two new DATEFORMAT options: MONTH.LONG and MONTH.LEADING")

                                    (FNS \DFE-OUTDATE)
                                    (P (COND ((CCODEP '\DFE-OUTDATE)
                                              (MOVD? '\OUTDATE '\DFE-SAVED-OUTDATE)
                                              (MOVD '\DFE-OUTDATE '\OUTDATE]
                              (VARS $$DATEFORMAT-EDITOR-ITEMS ($$DATEFORMAT-EDITOR))
                              (INITVARS (DATEFORMAT-EDITOR-ITEMS (COPY $$DATEFORMAT-EDITOR-ITEMS])



(* ;;; 
"This system provides a facility for editing date formats as described in section 12.5 of the Interlisp-D manual, Koto version.  User entry point is the function EDIT-DATEFORMAT.  Editing is accomplished using a FREEMENU.  Items displayed in this menu are stored on DATEFORMAT-EDITOR-ITEMS.  Call (GET-DATEFORMAT-EDITOR T) after changing this variable.  Input to EDIT-DATEFORMAT is either NIL or a value returned by the DATEFORMAT function.  Output is either NIL -- in case editing was aborted -- or another value as returned from the DATEFORMAT function."
)




(* ;;; "Interface")

(DEFINEQ

(EDIT-DATEFORMAT
  [LAMBDA (DATEFORMAT)                                      (* ; "Edited 24-Sep-87 13:36 by Koomen")

(* ;;; "This system provides a facility for editing date formats as described in section 12.14 of the Interlisp-D manual, Koto version.  Editing is accomplished using a FREEMENU.  Items displayed in this menu are stored on DATEFORMAT-EDITOR-ITEMS.  Call (GET-DATEFORMAT-EDITOR T) after changing this variable.  Input is either NIL or a value returned by the DATEFORMAT function.  Output is either NIL -- in case editing was aborted -- or another value as returned from the DATEFORMAT function.")

    (PROG ((DFE (GET-DATEFORMAT-EDITOR)))
          (DATEFORMAT-EDITOR-PUT-STATE DFE DATEFORMAT)
          (OPENW DFE)
          (FM.REDISPLAYMENU DFE)
          (DATEFORMAT-EDITOR-STATUS DFE 'EDIT)
          (NLSETQ (while (EQ (DATEFORMAT-EDITOR-STATUS DFE)
                             'EDIT) do (BLOCK)))
          (CLOSEW DFE)
          (if (EQ (DATEFORMAT-EDITOR-STATUS DFE)
                  'QUIT)
              then (RETURN (DATEFORMAT-EDITOR-GET-STATE DFE))
            else (DATEFORMAT-EDITOR-STATUS DFE 'ABORT])

(GET-DATEFORMAT-EDITOR
  [LAMBDA (RECOMPUTE?)                                      (* ; "Edited 24-Sep-87 13:36 by Koomen")

    (DECLARE (GLOBALVARS $$DATEFORMAT-EDITOR DATEFORMAT-EDITOR-ITEMS LASTMOUSEX LASTMOUSEY 
                    SCREENWIDTH SCREENHEIGHT))
    (PROG ((DFE $$DATEFORMAT-EDITOR))
          (if [OR RECOMPUTE? (NOT (WINDOWP DFE))
                  (NOT (FMEMB (DATEFORMAT-EDITOR-STATUS DFE)
                              '(QUIT ABORT]
              then (SETQ DFE (FREEMENU DATEFORMAT-EDITOR-ITEMS "Date Format Editor"))
                   (SETQ $$DATEFORMAT-EDITOR DFE)
                   (WINDOWPROP DFE 'CLOSEFN (FUNCTION DATEFORMAT-EDITOR-CLOSEFN))
                   (WINDOWPROP DFE 'SHRINKFN 'DON'T)
                   (WINDOWPROP DFE 'RESHAPEFN 'DON'T)
                   (DATEFORMAT-EDITOR-STATUS DFE 'QUIT))
          [MOVEW DFE [IMAX 0 (IMIN LASTMOUSEX (IDIFFERENCE SCREENWIDTH (fetch (REGION WIDTH)
                                                                          of (WINDOWREGION DFE]
                 (IMAX 0 (IMIN LASTMOUSEY (IDIFFERENCE SCREENHEIGHT (fetch (REGION HEIGHT)
                                                                       of (WINDOWREGION DFE]
          (RETURN DFE])
)



(* ;;; "Support")

(FILESLOAD (SYSLOAD)
       FREEMENU)
(DEFINEQ

(DATEFORMAT-EDITOR-STATUS
  [LAMBDA (DFE NEWSTATUS)                                    (* Koomen "30-Jan-87 23:41")
    (if NEWSTATUS
        then (WINDOWPROP DFE 'DATEFORMAT-EDITOR-STATUS NEWSTATUS)
      else (WINDOWPROP DFE 'DATEFORMAT-EDITOR-STATUS])

(DATEFORMAT-EDITOR-GET-STATE
  [LAMBDA (DFE)                                             (* ; "Edited 24-Sep-87 13:22 by Koomen")

    (PROG (FMT ITEM (STATE (FM.GETSTATE DFE)))
          (if (SETQ ITEM (LISTGET STATE 'DATE))
              then (SELECTQ (FM.ITEMPROP ITEM 'ID)
                       (DATE-NONE (push FMT 'NO.DATE))
                       (DATE-NORMAL NIL)
                       (DATE-SPACES (push FMT 'SPACES))
                       (DATE-SLASHES (push FMT 'SLASHES))
                       (DATE-LEADING (push FMT 'MONTH.LEADING))
                       (SHOULDNT "Bad DATE")))
          (if (SETQ ITEM (LISTGET STATE 'YEAR))
              then (SELECTQ (FM.ITEMPROP ITEM 'ID)
                       (YEAR-LONG (push FMT 'YEAR.LONG))
                       (YEAR-SHORT NIL)
                       (SHOULDNT "Bad YEAR")))
          (if (SETQ ITEM (LISTGET STATE 'MONTH))
              then (SELECTQ (FM.ITEMPROP ITEM 'ID)
                       (MONTH-LONG (push FMT 'MONTH.LONG))
                       (MONTH-SHORT NIL)
                       (MONTH-NUMERIC (push FMT 'NUMBER.OF.MONTH))
                       (SHOULDNT "Bad MONTH")))
          (if (SETQ ITEM (LISTGET STATE 'DAY))
              then (SELECTQ (FM.ITEMPROP ITEM 'ID)
                       (DAY-NONE NIL)
                       (DAY-LONG (push FMT 'DAY.OF.WEEK))
                       (DAY-SHORT (push FMT 'DAY.OF.WEEK)
                                  (push FMT 'DAY.SHORT))
                       (SHOULDNT "Bad DAY")))
          (if (SETQ ITEM (LISTGET STATE 'LEADER))
              then (SELECTQ (FM.ITEMPROP ITEM 'ID)
                       (LEADER-NO (push FMT 'NO.LEADING.SPACES))
                       (LEADER-YES NIL)
                       (SHOULDNT "Bad LEADER")))
          (if (SETQ ITEM (LISTGET STATE 'TIME))
              then (SELECTQ (FM.ITEMPROP ITEM 'ID)
                       (TIME-SECS NIL)
                       (TIME-NONE (push FMT 'NO.TIME))
                       (TIME-MINS (push FMT 'NO.SECONDS))
                       (SHOULDNT "Bad TIME")))
          (if (SETQ ITEM (LISTGET STATE 'TIMEZONE))
              then (SELECTQ (FM.ITEMPROP ITEM 'ID)
                       (TIMEZONE-NO NIL)
                       (TIMEZONE-YES (push FMT 'TIME.ZONE))
                       (SHOULDNT "Bad TIMEZONE")))
          (RETURN (APPLY (FUNCTION DATEFORMAT)
                         FMT])

(DATEFORMAT-EDITOR-PUT-STATE
  [LAMBDA (DFE DATEFORMAT)                                  (* ; "Edited 24-Sep-87 13:22 by Koomen")

    (FM.RESETMENU DFE)
    (for FMT in (if (AND DATEFORMAT (EQ (CAR (LISTP DATEFORMAT))
                                        'DATEFORMAT))
                    then (CDR DATEFORMAT)) bind DATE YEAR MONTH DAY LEADER TIME TIMEZONE
       do (SELECTQ FMT
              (NO.DATE (SETQ DATE 'DATE-NONE))
              (NUMBER.OF.MONTH 
                   (SETQ MONTH 'MONTH-NUMERIC))
              (MONTH.LEADING (SETQ DATE 'DATE-LEADING))
              (MONTH.LONG (SETQ MONTH 'MONTH-LONG))
              (YEAR.LONG (SETQ YEAR 'YEAR-LONG))
              (SLASHES (SETQ DATE 'DATE-SLASHES))
              (SPACES (SETQ DATE 'DATE-SPACES))
              (NO.LEADING.SPACES 
                   (SETQ LEADER 'LEADER-NO))
              (NO.TIME (SETQ TIME 'TIME-NONE))
              (TIME.ZONE (SETQ TIMEZONE 'TIMEZONE-YES))
              (NO.SECONDS (SETQ TIME 'TIME-MINS))
              (DAY.OF.WEEK (OR DAY (SETQ DAY 'DAY-LONG)))
              (DAY.SHORT (SETQ DAY 'DAY-SHORT))
              (PROGN                                         (* ; "???")

                     NIL)) finally (if (AND DATE (SETQ DATE (FM.GETITEM DATE NIL DFE)))
                                       then (FM.CHANGESTATE 'DATE DATE DFE))
                                 (if (AND YEAR (SETQ YEAR (FM.GETITEM YEAR NIL DFE)))
                                     then (FM.CHANGESTATE 'YEAR YEAR DFE))
                                 (if (AND MONTH (SETQ MONTH (FM.GETITEM MONTH NIL DFE)))
                                     then (FM.CHANGESTATE 'MONTH MONTH DFE))
                                 (if (AND DAY (SETQ DAY (FM.GETITEM DAY NIL DFE)))
                                     then (FM.CHANGESTATE 'DAY DAY DFE))
                                 (if (AND LEADER (SETQ LEADER (FM.GETITEM LEADER NIL DFE)))
                                     then (FM.CHANGESTATE 'LEADER LEADER DFE))
                                 (if (AND TIME (SETQ TIME (FM.GETITEM TIME NIL DFE)))
                                     then (FM.CHANGESTATE 'TIME TIME DFE))
                                 (if (AND TIMEZONE (SETQ TIMEZONE (FM.GETITEM TIMEZONE NIL DFE)))
                                     then (FM.CHANGESTATE 'TIMEZONE TIMEZONE DFE])

(DATEFORMAT-EDITOR-ABORTFN
  [LAMBDA (ITEM WINDOW BUTTONS)                              (* Koomen "30-Jan-87 23:43")
    (DATEFORMAT-EDITOR-STATUS WINDOW 'ABORT])

(DATEFORMAT-EDITOR-CLOSEFN
  [LAMBDA (WINDOW)                                           (* Koomen "30-Jan-87 23:42")
    (if (EQ (DATEFORMAT-EDITOR-STATUS WINDOW)
            'EDIT)
        then (DATEFORMAT-EDITOR-STATUS WINDOW 'ABORT])

(DATEFORMAT-EDITOR-QUITFN
  [LAMBDA (ITEM WINDOW BUTTONS)                              (* Koomen "30-Jan-87 23:44")
    (DATEFORMAT-EDITOR-STATUS WINDOW 'QUIT])
)



(* ;; 
"Redefine \OUTDATE in the system file IOCHARS to add two new DATEFORMAT options: MONTH.LONG and MONTH.LEADING"
)

(DEFINEQ

(\DFE-OUTDATE
  [LAMBDA (UD FORMAT STRING)                                 (* Koomen "20-Feb-87 01:03")
                                                             (* bvm%: "28-Jun-85 17:23")
          
          (* ;; "Adapted from \OUTDATE in IOCHARS of 28-Jun-85 21:07:58")

    (PROG ((TIME (CDDDR UD))
           (SEPR (CHARCODE -))
           YEAR SIZE DAY MONTH S N NO.DATE NO.TIME NO.LEADING.SPACES TIME.ZONE TIME.ZONE.LENGTH 
           YEAR.LENGTH MONTH.LENGTH DAY.LENGTH NO.SECONDS NUMBER.OF.MONTH YEAR.LONG MONTH.LONG 
           MONTH.LEADING DAY.OF.WEEK DAY.SHORT)
          [if (NULL FORMAT)
              then NIL
            elseif (NEQ (CAR (LISTP FORMAT))
                        'DATEFORMAT)
              then (LISPERROR "ILLEGAL ARG" FORMAT)
            else (for TOKEN in FORMAT do (SELECTQ TOKEN
                                             (NO.DATE (SETQ NO.DATE T))
                                             (NO.TIME (SETQ NO.TIME T))
                                             (NUMBER.OF.MONTH 
                                                  (SETQ NUMBER.OF.MONTH T))
                                             (MONTH.LONG (SETQ MONTH.LONG T))
                                             (MONTH.LEADING (SETQ MONTH.LEADING T))
                                             (YEAR.LONG (SETQ YEAR.LONG T))
                                             (SLASHES (SETQ SEPR (CHARCODE /)))
                                             (SPACES (SETQ SEPR (CHARCODE SPACE)))
                                             (NO.LEADING.SPACES 
                                                  (SETQ NO.LEADING.SPACES T))
                                             (TIME.ZONE (SETQ TIME.ZONE (CDR (ASSOC \TimeZoneComp 
                                                                                    TIME.ZONES))))
                                             (NO.SECONDS (SETQ NO.SECONDS T))
                                             (DAY.OF.WEEK (SETQ DAY.OF.WEEK T))
                                             (DAY.SHORT (SETQ DAY.SHORT T))
                                             NIL))
                 (if MONTH.LEADING
                     then (SETQ NUMBER.OF.MONTH NIL)
                          (SETQ SEPR (CHARCODE SPACE]
          [SETQ SIZE
           (IPLUS (if NO.DATE
                      then 0
                    else (SETQ YEAR (CAR UD))
                         (SETQ MONTH (IPLUS (CADR UD)
                                            1))
                         (SETQ DAY (CADDR UD))
                         (IPLUS 2 (SETQ YEAR.LENGTH (if YEAR.LONG
                                                        then 4
                                                      elseif (IGREATERP YEAR 1999)
                                                        then (SETQ YEAR.LONG T)
                                                             4
                                                      else (SETQ YEAR (IREMAINDER YEAR 100))
                                                           2))
                                (SETQ DAY.LENGTH (if (AND (OR NO.LEADING.SPACES MONTH.LEADING)
                                                          (ILESSP DAY 10))
                                                     then 1
                                                   else 2))
                                (SETQ MONTH.LENGTH
                                 (if NUMBER.OF.MONTH
                                     then (if (AND (OR NO.LEADING.SPACES MONTH.LEADING)
                                                   (ILESSP MONTH 10))
                                              then 1
                                            else 2)
                                   elseif MONTH.LONG
                                     then (SETQ MONTH
                                           (CAR (NTH '("January" "February" "March" "April" "May" 
                                                             "June" "July" "August" "September" 
                                                             "October" "November" "December") MONTH))
                                           )
                                          (NCHARS MONTH)
                                   else (SETQ MONTH
                                         (CAR (NTH '("Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" 
                                                           "Sep" "Oct" "Nov" "Dec") MONTH)))
                                        3))
                                (if MONTH.LEADING
                                    then                     (* ; "Insert a comma")

                                         1
                                  else 0)
                                (if DAY.OF.WEEK
                                    then [SETQ DAY.OF.WEEK
                                          (CAR (NTH '("Monday" "Tuesday" "Wednesday" "Thursday" 
                                                            "Friday" "Saturday" "Sunday")
                                                    (IPLUS (CAR (CDDDDR TIME))
                                                           1]
                                         [IPLUS 3 (SETQ DAY.SHORT
                                                   (if DAY.SHORT
                                                       then (SETQ DAY.OF.WEEK (SUBSTRING DAY.OF.WEEK 
                                                                                     1 3))
                                                            3
                                                     else (NCHARS DAY.OF.WEEK]
                                  else 0)))
                  (if NO.TIME
                      then 0
                    else (IPLUS (if NO.DATE
                                    then 5
                                  else 6)
                                (if NO.SECONDS
                                    then 0
                                  else 3)
                                (if (NULL TIME.ZONE)
                                    then 0
                                  elseif (EQ (SETQ TIME.ZONE.LENGTH (NCHARS TIME.ZONE))
                                             1)
                                    then 4
                                  else (IPLUS TIME.ZONE.LENGTH 1]
          (SETQ S (ALLOCSTRING SIZE (CHARCODE SPACE)))
          [if NO.DATE
              then (SETQ N 0)
            else (if MONTH.LEADING
                     then (if NUMBER.OF.MONTH
                              then (PROMPTPRINT MONTH.LENGTH)
                                   (\RPLRIGHT S (SETQ N MONTH.LENGTH)
                                          MONTH MONTH.LENGTH)
                            else (RPLSTRING S 1 MONTH)
                                 (SETQ N MONTH.LENGTH))
                          (RPLCHARCODE S (add N 1)
                                 SEPR)
                          (\RPLRIGHT S (add N (if (AND (OR NO.LEADING.SPACES MONTH.LEADING)
                                                       (ILESSP DAY 10))
                                                  then 1
                                                else 2))
                                 DAY 1)
                          (if MONTH.LEADING
                              then (RPLCHARCODE S (add N 1)
                                          (CHARCODE ",")))
                   else (\RPLRIGHT S (SETQ N (if (AND NO.LEADING.SPACES (ILESSP DAY 10))
                                                 then 1
                                               else 2))
                               DAY 1)
                        (RPLCHARCODE S (add N 1)
                               SEPR)
                        (if NUMBER.OF.MONTH
                            then (\RPLRIGHT S (add N MONTH.LENGTH)
                                        MONTH MONTH.LENGTH)
                          else (RPLSTRING S (IPLUS N 1)
                                      MONTH)
                               (add N MONTH.LENGTH)))
                 (RPLCHARCODE S (add N 1)
                        SEPR)
                 (\RPLRIGHT S (add N YEAR.LENGTH)
                        YEAR 2)
                 (if (NOT NO.TIME)
                     then (add N 1))
                 (if DAY.OF.WEEK
                     then                                    (* Day of week at very end in parens)
                          (RPLCHARCODE S (IPLUS (IDIFFERENCE SIZE DAY.SHORT)
                                                -1)
                                 (CHARCODE "("))
                          (RPLSTRING S (IDIFFERENCE SIZE DAY.SHORT)
                                 DAY.OF.WEEK)
                          (RPLCHARCODE S SIZE (CHARCODE ")"]
          [if (NOT NO.TIME)
              then (\RPLRIGHT S (IPLUS N 2)
                          (CAR TIME)
                          2)
                   (RPLCHARCODE S (IPLUS N 3)
                          (CHARCODE %:))
                   (\RPLRIGHT S (add N 5)
                          (CADR TIME)
                          2)
                   (if (NOT NO.SECONDS)
                       then (RPLCHARCODE S (IPLUS N 1)
                                   (CHARCODE %:))
                            (\RPLRIGHT S (add N 3)
                                   (CADDR TIME)
                                   2))
                   (if TIME.ZONE
                       then (RPLSTRING S (IPLUS N 2)
                                   TIME.ZONE)
                            (if (EQ TIME.ZONE.LENGTH 1)
                                then                         (* Fill in daylight or standard)
                                     (RPLSTRING S (IPLUS N 3)
                                            (if (CADDDR TIME)
                                                then "DT"
                                              else "ST"]
          (RETURN (if STRING
                      then (SUBSTRING S 1 -1 STRING)
                    else S])
)
[COND ((CCODEP '\DFE-OUTDATE)
       (MOVD? '\OUTDATE '\DFE-SAVED-OUTDATE)
       (MOVD '\DFE-OUTDATE '\OUTDATE]

(RPAQQ $$DATEFORMAT-EDITOR-ITEMS (((LABEL Quit SELECTEDFN DATEFORMAT-EDITOR-QUITFN MESSAGE 
                                          "Stop editing, return current settings" FONT
                                          (GACHA 10 BOLD))
                                   (LABEL "")
                                   (LABEL Abort SELECTEDFN DATEFORMAT-EDITOR-ABORTFN MESSAGE 
                                          "Stop editing, ignore changes, return NIL" FONT
                                          (GACHA 10 BOLD)))
                                  ((TYPE DISPLAY LABEL ""))
                                  ((TYPE DISPLAY LABEL "DATE:" FONT (GACHA 10 BOLD)))
                                  ((TYPE DISPLAY LABEL "  Format: " FONT (GACHA 10 BOLD))
                                   (TYPE NWAY COLLECTION DATE ID DATE-NORMAL LABEL "dd-mon-yy")
                                   (LABEL "")
                                   (TYPE NWAY COLLECTION DATE ID DATE-NONE LABEL "none"))
                                  ((LABEL "          ")
                                   (TYPE NWAY COLLECTION DATE ID DATE-SLASHES LABEL "dd/mon/yy")
                                   (LABEL "")
                                   (TYPE NWAY COLLECTION DATE ID DATE-SPACES LABEL "dd mon yy"))
                                  ((LABEL "          ")
                                   (TYPE NWAY COLLECTION DATE ID DATE-LEADING LABEL "mon dd, yy"))
                                  ((TYPE DISPLAY LABEL "  Year:   " FONT (GACHA 10 BOLD))
                                   (TYPE NWAY COLLECTION YEAR ID YEAR-SHORT LABEL "short")
                                   (TYPE NWAY COLLECTION YEAR ID YEAR-LONG LABEL "long"))
                                  ((TYPE DISPLAY LABEL "  Month:  " FONT (GACHA 10 BOLD))
                                   (TYPE NWAY COLLECTION MONTH ID MONTH-SHORT LABEL "short")
                                   (TYPE NWAY COLLECTION MONTH ID MONTH-LONG LABEL "long")
                                   (TYPE NWAY COLLECTION MONTH ID MONTH-NUMERIC LABEL "numeric"))
                                  ((TYPE DISPLAY LABEL "  Weekday:" FONT (GACHA 10 BOLD))
                                   (TYPE NWAY COLLECTION DAY ID DAY-NONE LABEL "none")
                                   (TYPE NWAY COLLECTION DAY ID DAY-LONG LABEL "long")
                                   (TYPE NWAY COLLECTION DAY ID DAY-SHORT LABEL "short"))
                                  ((TYPE DISPLAY LABEL "  Leading spaces:" FONT (GACHA 10 BOLD))
                                   (TYPE NWAY COLLECTION LEADER ID LEADER-YES LABEL "yes")
                                   (TYPE NWAY COLLECTION LEADER ID LEADER-NO LABEL "no"))
                                  ((TYPE DISPLAY LABEL "TIME:" FONT (GACHA 10 BOLD)))
                                  ((TYPE DISPLAY LABEL "  Format:   " FONT (GACHA 10 BOLD))
                                   (TYPE NWAY COLLECTION TIME ID TIME-SECS LABEL "hh:mm:ss")
                                   (TYPE NWAY COLLECTION TIME ID TIME-MINS LABEL "hh:mm")
                                   (TYPE NWAY COLLECTION TIME ID TIME-NONE LABEL "none"))
                                  ((TYPE DISPLAY LABEL "  Time Zone:" FONT (GACHA 10 BOLD))
                                   (TYPE NWAY COLLECTION TIMEZONE ID TIMEZONE-NO LABEL "no")
                                   (TYPE NWAY COLLECTION TIMEZONE ID TIMEZONE-YES LABEL "yes" TIME-N3
                                         ))))

(RPAQQ $$DATEFORMAT-EDITOR NIL)

(RPAQ? DATEFORMAT-EDITOR-ITEMS (COPY $$DATEFORMAT-EDITOR-ITEMS))
(PUTPROPS DATEFORMAT-EDITOR COPYRIGHT ("Johannes A. G. M. Koomen" 1987))
(DECLARE%: DONTCOPY
  (FILEMAP (NIL (3136 5634 (EDIT-DATEFORMAT 3146 . 4348) (GET-DATEFORMAT-EDITOR 4350 . 5632)) (5699 
11576 (DATEFORMAT-EDITOR-STATUS 5709 . 5987) (DATEFORMAT-EDITOR-GET-STATE 5989 . 8509) (
DATEFORMAT-EDITOR-PUT-STATE 8511 . 10950) (DATEFORMAT-EDITOR-ABORTFN 10952 . 11130) (
DATEFORMAT-EDITOR-CLOSEFN 11132 . 11396) (DATEFORMAT-EDITOR-QUITFN 11398 . 11574)) (11705 22186 (
\DFE-OUTDATE 11715 . 22184)))))
STOP