Commit ac1c1c88 authored by Joel Rosdahl's avatar Joel Rosdahl
Browse files

Clean-up of time handling and time formatting functions. Essentially,

lyskom-format-time, lyskom-client-date-string and
lyskom-return-date-and-time have been replaced with a single function:
lyskom-format-time.  Also, the internal time representation now has
years that are relative to year 0 and months that start with 1 for
January.

New variables: kom-print-relative-dates and
kom-print-seconds-in-time-strings.
parent 14f54cfa
2001-04-23 Joel Rosdahl <joel@rosdahl.net>
Clean-up of time handling and time formatting functions.
Essentially, lyskom-format-time, lyskom-client-date-string and
lyskom-return-date-and-time have been replaced with a single
function: lyskom-format-time. Also, the internal time
representation now has years that are relative to year 0 and
months that start with 1 for January.
* view-text.el (lyskom-return-date-and-time): Removed.
(lyskom-print-date-and-time): Removed.
* utilities.el (lyskom-current-time): Removed.
(lyskom-client-date): Removed.
(lyskom-client-date-string): Removed.
* swedish-strings.el (lyskom-message): New timeformat-* strings.
* english-strings.el (lyskom-message): Ditto.
* vars.el.in (kom-print-seconds-in-time-strings): New variable.
* vars.el.in (kom-print-relative-dates): Renamed
lyskom-print-complex-dates to kom-print-relative-dates.
* lyskom-rest.el (lyskom-save-text): Ditto.
* edit-text.el (lyskom-edit-fcc-text): Inhibit
kom-print-relative-dates.
* commands2.el (lyskom-memb-received): Inhibit
kom-print-seconds-in-time-strings.
(kom-status-conf): Ditto.
(kom-status-person): Ditto.
* option-edit.el (lyskom-customize-buffer-format): Added
kom-print-relative-dates and kom-print-seconds-in-time strings.
(lyskom-custom-variables): Ditto.
* swedish-strings.el (lyskom-custom-strings): Ditto.
* english-strings.el (lyskom-custom-strings): Ditto.
* komtypes.el (lyskom-create-time): Added docstring note.
* view-text.el (lyskom-calculate-day-diff): Use "new" time type.
(lyskom-mx-date-to-time): Ditto.
* parse.el (lyskom-parse-time): Ditto.
* mship-edit.el (lp--format-entry-expansion): Ditto.
* commands2.el (lyskom-print-summary-line): Ditto.
(lyskom-print-mark-summary-line): Ditto.
* commands1.el (kom-display-time): Ditto.
(lyskom-nameday): Ditto.
* commands1.el (lyskom-format-time): Removed.
* utilities.el (lyskom-format-time): New function.
* view-text.el (lyskom-view-text): Use new lyskom-format-time.
(lyskom-print-header-recpt): Ditto.
(lyskom-print-header-comm): Ditto.
* startup.el (lyskom): Ditto.
* remote-control.el (lyskom-remote-handler): Ditto.
(lyskom-remote-set-message): Ditto.
(lyskom-remote-autoreply): Ditto.
(lyskom-remote-list-messages-1): Ditto.
(lyskom-remote-erase-messages): Ditto.
(lyskom-remote-quit): Ditto.
* mship-edit.el (lp--format-entry): Ditto.
(lp--format-entry-expansion): Ditto.
* lyskom-rest.el (lyskom-sentinel): Ditto.
* edit-text.el (lyskom-edit-fcc-text): Ditto.
* commands2.el (lyskom-memb-received): Ditto.
(kom-status-conf): Ditto.
(kom-status-person): Ditto.
* commands1.el (lyskom-who-is-on-8): Ditto.
(lyskom-who-is-on-9): Ditto.
(lyskom-insert-deferred-session-info-since): Ditto.
(kom-list-clients): Ditto.
(lyskom-status-session-9): Ditto.
* commands1.el (kom-display-time): Ditto.
* aux-items.el (lyskom-aux-item-info): Ditto.
(lyskom-print-read-confirm): Ditto.
* async.el (lyskom-format-as-personal-message): Ditto.
* ansaphone.el (kom-toggle-auto-reply): Ditto.
* utilities.el (lyskom-current-server-time): New function.
* commands1.el (kom-display-time): Use lyskom-current-server-time.
(lyskom-nameday): Ditto.
* commands2.el (lyskom-list-summary): Ditto.
(kom-list-marks): Ditto.
* utilities.el (lyskom-current-client-time): New function.
(lyskom-client-date): Removed.
* ansaphone.el (lyskom-ansaphone-record-message): Use
lyskom-current-client-time.
* parse.el (lyskom-parse-member-old): Ditto.
(lyskom-parse-membership-old): Ditto.
* async.el (lyskom-format-as-personal-message): Ditto.
2001-04-22 Johan Sundstrm <jhs@lysator.liu.se>
* commands1.el (lyskom-get-least-used-mark-types-alist): New
......
......@@ -78,7 +78,8 @@
'state-off)))
(if kom-ansaphone-on
(progn
(setq lyskom-ansaphone-when-set (lyskom-client-date-string))
(setq lyskom-ansaphone-when-set (lyskom-format-time
'timeformat-yyyy-mm-dd-hh-mm))
(lyskom-format-insert (lyskom-get-string-sol 'ansaphone-message)
kom-ansaphone-default-reply))))
......@@ -217,7 +218,7 @@ kom-ansaphone-default-reply and kom-ansaphone-replies."
(if (not (numberp recipient))
(setq recipient (conf-stat->conf-no recipient)))
(setq lyskom-ansaphone-messages (cons (list sender recipient text
(lyskom-client-date))
(lyskom-current-client-time))
lyskom-ansaphone-messages)))
......
......@@ -491,21 +491,15 @@ WHEN, if given, is the time when the message arrived. It must be a lyskom
time structure.
Non-nil NOBEEP means don't beep."
(let ((lyskom-last-text-format-flags nil)
(now (lyskom-client-date)))
(when (null when) (setq when (lyskom-client-date)))
(now (lyskom-current-client-time)))
(when (null when) (setq when (lyskom-current-client-time)))
(if (or kom-show-personal-message-date
(not (eq (time->mday when) (time->mday now)))
(not (eq (time->mon when) (time->mon now)))
(not (eq (time->year when) (time->year now))))
(setq when (lyskom-format 'time-yyyy-mm-dd-hh-mm
(+ (time->year when) 1900)
(time->mon when)
(time->mday when)
(time->hour when)
(time->min when)))
(setq when (lyskom-format 'time-hh-mm
(time->hour when)
(time->min when))))
(setq when (let ((kom-print-relative-dates nil))
(lyskom-format-time 'date-and-time when)))
(setq when (lyskom-format-time 'time when)))
(setq nobeep (or nobeep (and kom-ansaphone-on
kom-silent-ansaphone)))
......
......@@ -317,7 +317,7 @@ return non-nil if the item is to be included in the list."
(lyskom-aux-item-definition->name def)
"unknown")
(aux-item->creator item)
(lyskom-return-date-and-time (aux-item->sent-at item))
(lyskom-format-time 'date-and-time (aux-item->sent-at item))
(if (aux-item-flags->deleted (aux-item->flags item))
(format "(%s)" (lyskom-get-string 'deleted))
"")
......@@ -484,7 +484,7 @@ return non-nil if the item is to be included in the list."
(concat
(lyskom-format 'read-confirm-aux
(aux-item->creator item)
(lyskom-return-date-and-time (aux-item->sent-at item)))
(lyskom-format-time 'date-and-time (aux-item->sent-at item)))
(lyskom-aux-item-terminating-button item obj)))
......
......@@ -2078,25 +2078,13 @@ If MARK-NO is nil, review all marked texts."
))
(defun lyskom-format-time (time)
"Return TIME as a formatted string."
(lyskom-format 'time-format-exact
(+ (time->year time) 1900)
(1+ (time->mon time))
(time->mday time)
(time->hour time)
(time->min time)
(time->sec time)
(elt (lyskom-get-string 'weekdays)
(time->wday time))))
(lyskom-external-function calendar-iso-from-absolute)
(lyskom-external-function calendar-absolute-from-gregorian)
(def-kom-command kom-display-time ()
"Ask server about time and date."
(interactive)
(let ((time (blocking-do 'get-time))
(let ((time (lyskom-current-server-time))
(lyskom-last-text-format-flags nil)
(weekno nil))
(lyskom-format-insert
......@@ -2107,13 +2095,13 @@ If MARK-NO is nil, review all marked texts."
(setq weekno
(car (calendar-iso-from-absolute
(calendar-absolute-from-gregorian
(list (1+ (time->mon time))
(list (time->mon time)
(time->mday time)
(+ 1900 (time->year time)))))))
(time->year time))))))
'time-is-week)
(error 'time-is))
'time-is)
(lyskom-format-time time)
(lyskom-format-time 'timeformat-day-yyyy-mm-dd-hh-mm-ss time)
;; Kult:
(if (and (= (time->hour time)
(+ (/ (time->sec time) 10)
......@@ -2129,9 +2117,9 @@ If MARK-NO is nil, review all marked texts."
(let ((when (car el))
(event (cdr el)))
(if (and (or (null (elt when 0))
(= (+ (time->year time) 1900) (elt when 0)))
(= (time->year time) (elt when 0)))
(or (null (elt when 1))
(= (1+ (time->mon time)) (elt when 1)))
(= (time->mon time) (elt when 1)))
(or (null (elt when 2))
(= (time->mday time) (elt when 2)))
(or (null (elt when 3))
......@@ -2146,8 +2134,8 @@ If MARK-NO is nil, review all marked texts."
(lyskom-format-insert
"%#1t"
(lyskom-format event
(+ (time->year time) 1900)
(1+ (time->mon time))
(time->year time)
(time->mon time)
(time->mday time)
(time->hour time)
(time->min time)
......@@ -2168,7 +2156,7 @@ If MARK-NO is nil, review all marked texts."
;(def-kom-command kom-display-calendar ()
; "Nothing yet"
; (interactive)
; (let* ((time (blocking-do 'get-time))
; (let* ((time (lyskom-current-server-time))
; (nameday (lyskom-nameday time))
; (special (lyskom-special-date time)))
; ))
......@@ -2549,8 +2537,8 @@ If MARK-NO is nil, review all marked texts."
(31 . ("Sylvester"))))))
(defun lyskom-nameday (&optional now)
(let* ((time (or now (blocking-do 'get-time)))
(mlist (cdr (assq (1+ (time->mon time)) lyskom-nameday-alist)))
(let* ((time (or now (lyskom-current-server-time)))
(mlist (cdr (assq (time->mon time) lyskom-nameday-alist)))
(dlist (cdr (assq (time->mday time) mlist))))
(cond ((null dlist) nil)
((eq 1 (length dlist))
......@@ -2670,8 +2658,8 @@ Uses Protocol A version 8 calls"
(lyskom-insert (concat (make-string (- (lyskom-window-width) 1) ?-)
"\n"))
(lyskom-insert (lyskom-format 'total-visible-users total-users
(lyskom-client-date-string
'time-format-exact)))))
(lyskom-format-time
'timeformat-day-yyyy-mm-dd-hh-mm-ss)))))
(defun lyskom-who-is-on-9 (arg &optional conf-stat)
......@@ -2796,6 +2784,7 @@ Uses Protocol A version 9 calls"
(setq since
(upcase-initials
(lyskom-format-time
'timeformat-day-yyyy-mm-dd-hh-mm-ss
(static-session-info->connection-time static))))
(setq defer-info
(lyskom-create-defer-info
......@@ -2811,6 +2800,7 @@ Uses Protocol A version 9 calls"
(blocking-do 'get-static-session-info session-no))
(setq since (upcase-initials
(lyskom-format-time
'timeformat-day-yyyy-mm-dd-hh-mm-ss
(static-session-info->connection-time static))))))
(lyskom-format-insert
format-string-3
......@@ -2832,7 +2822,8 @@ Uses Protocol A version 9 calls"
(t
'total-visible-active-users))
total-users
(lyskom-client-date-string 'time-format-exact)))))
(lyskom-format-time
'timeformat-day-yyyy-mm-dd-hh-mm-ss)))))
(defun lyskom-who-is-on-check-membership-8 (who-info-list conf-stat)
"Returns a list of those in WHO-INFO-LIST which is member in CONF-STAT."
......@@ -2879,6 +2870,7 @@ Uses Protocol A version 9 calls"
(lyskom-replace-deferred defer-info
(upcase-initials
(lyskom-format-time
'timeformat-day-yyyy-mm-dd-hh-mm-ss
(static-session-info->connection-time session-info))))
(lyskom-replace-deferred defer-info "")))
......@@ -2946,8 +2938,8 @@ Uses Protocol A version 9 calls"
(lyskom-insert (lyskom-format (if want-invisible
'total-users
'total-visible-users) total-users
(lyskom-client-date-string
'time-format-exact)))
(lyskom-format-time
'timeformat-day-yyyy-mm-dd-hh-mm-ss)))
(lyskom-format-insert "%#1D\n"
(lyskom-create-defer-info
'get-time nil
......@@ -3195,6 +3187,7 @@ WHO-INFOS that are potential sessions."
(lyskom-get-string 'doing-where-conn)
(lyskom-get-string 'doing-nowhere-conn))
(lyskom-format-time
'timeformat-day-yyyy-mm-dd-hh-mm-ss
(static-session-info->connection-time static))
(cond ((eq (/ (dynamic-session-info->idle-time info) 60) 0)
(lyskom-get-string 'session-is-active))
......
......@@ -127,11 +127,12 @@ MAP may be nil if there are no new texts."
(goto-char (point-max))
(let ((lyskom-executing-command 'kom-membership)
(lyskom-current-command 'kom-membership)
(inhibit-read-only t))
(inhibit-read-only t)
(kom-print-seconds-in-time-strings nil))
(lyskom-format-insert 'memberships-line
(lyskom-return-date-and-time
(membership->last-time-read
membership))
(lyskom-format-time 'date-and-time
(membership->last-time-read
membership))
(membership->priority membership)
(cond
((null map) 0)
......@@ -159,7 +160,8 @@ otherwise: the conference is read with lyskom-completing-read."
(let ((conf-no
(or conf-no
(lyskom-read-conf-no (lyskom-get-string 'conf-for-status)
'(all) nil nil t))))
'(all) nil nil t)))
(kom-print-seconds-in-time-strings nil))
(cache-del-conf-stat conf-no)
(cache-del-uconf-stat conf-no)
(blocking-do-multiple ((conf-stat (get-conf-stat conf-no))
......@@ -200,7 +202,8 @@ otherwise: the conference is read with lyskom-completing-read."
"\n"
"")))
(lyskom-format-insert 'created-at
(lyskom-return-date-and-time
(lyskom-format-time
'date-and-time
(conf-stat->creation-time conf-stat)))
(lyskom-format-insert 'members
(conf-stat->no-of-members conf-stat))
......@@ -224,7 +227,8 @@ otherwise: the conference is read with lyskom-completing-read."
(1- (+ (conf-stat->no-of-texts conf-stat)
(conf-stat->first-local-no conf-stat))))
(lyskom-format-insert 'last-text-time
(lyskom-return-date-and-time
(lyskom-format-time
'date-and-time
(conf-stat->last-written conf-stat)))
(lyskom-format-insert 'no-of-motd
(conf-stat->msg-of-day conf-stat))
......@@ -297,7 +301,8 @@ otherwise: the conference is read with lyskom-completing-read."
(lyskom-insert-string 'secret-membership)
(lyskom-insert
(format "%17s"
(lyskom-return-date-and-time
(lyskom-format-time
'date-and-time
(membership->last-time-read membership))))
(let ((unread (- (+ (conf-stat->first-local-no
conf-stat)
......@@ -318,7 +323,8 @@ otherwise: the conference is read with lyskom-completing-read."
(not (eq (member->pers-no member)
(member->created-by member))))
(lyskom-format-insert 'conf-membership-line-2
(lyskom-return-date-and-time
(lyskom-format-time
'date-and-time
(member->created-at member))
(member->created-by member)))
)))))
......@@ -345,6 +351,7 @@ otherwise: the conference is read with lyskom-completing-read."
(or pers-no
(lyskom-read-conf-no (lyskom-get-string 'pers-for-status)
'(pers) nil "" t)))
(kom-print-seconds-in-time-strings nil)
conf-stat
pers-stat)
(cache-del-conf-stat pers-no)
......@@ -360,7 +367,8 @@ otherwise: the conference is read with lyskom-completing-read."
conf-stat
conf-stat)
(lyskom-format-insert 'created-time
(lyskom-return-date-and-time
(lyskom-format-time
'date-and-time
(conf-stat->creation-time conf-stat)))
(lyskom-format-insert 'created-confs
......@@ -385,7 +393,8 @@ otherwise: the conference is read with lyskom-completing-read."
(mod (floor time 60) 60)
(round (mod time 60)))))
(lyskom-format-insert 'last-log-in
(lyskom-return-date-and-time
(lyskom-format-time
'date-and-time
(pers-stat->last-login pers-stat)))
(lyskom-format-insert 'user-name
(pers-stat->username pers-stat))
......@@ -395,7 +404,8 @@ otherwise: the conference is read with lyskom-completing-read."
(lyskom-format-insert 'marked-texts
(pers-stat->no-of-marks pers-stat)))
(lyskom-format-insert 'time-for-last-letter
(lyskom-return-date-and-time
(lyskom-format-time
'date-and-time
(conf-stat->last-written conf-stat)))
(let ((superconf (conf-stat->super-conf conf-stat)))
......@@ -460,7 +470,8 @@ otherwise: the conference is read with lyskom-completing-read."
(lyskom-insert-string 'secret-membership)
(lyskom-insert
(format "%17s"
(lyskom-return-date-and-time
(lyskom-format-time
'date-and-time
(membership->last-time-read membership))))
(let ((unread (- (+ (conf-stat->first-local-no
member-conf-stat)
......@@ -485,7 +496,8 @@ otherwise: the conference is read with lyskom-completing-read."
(not (eq (conf-stat->conf-no conf-stat)
(membership->created-by membership))))
(lyskom-format-insert 'pers-membership-line-2
(lyskom-return-date-and-time
(lyskom-format-time
'date-and-time
(membership->created-at membership))
(membership->created-by membership)))
......@@ -947,7 +959,7 @@ on one line."
"List a summary of the texts in TEXTS.
The summary contains the date, number of lines, author and subject of the text
on one line."
(let ((time (blocking-do 'get-time))
(let ((time (lyskom-current-server-time))
(author-width (/ (- (lyskom-window-width) 22) 3)))
;; Start fetching all text-stats and text to list them.
......@@ -996,7 +1008,7 @@ Format is 23:29 if the text is written today. Otherwise 04-01."
(= mday (time->mday time)))
(format "%02d:%02d" (time->hour time)
(time->min time))
(format "%02d-%02d" (1+ (time->mon time))
(format "%02d-%02d" (time->mon time)
(time->mday time))))
;; length for lines is: 4
;; We split the rest between author and subject
......@@ -1035,7 +1047,7 @@ Format is 23:29 if the text is written today. Otherwise 04-01."
(let ((marks
(sort (listify-vector (blocking-do 'get-marks))
(lambda (a b) (< (mark->mark-type a) (mark->mark-type b)))))
(time (blocking-do 'get-time))
(time (lyskom-current-server-time))
(author-width (max 0
(/ (- (lyskom-window-width)
23
......@@ -1097,7 +1109,7 @@ Format is 23:29 if the text is written today. Otherwise 04-01."
(= day (time->yday time)))
(format "%02d:%02d" (time->hour time)
(time->min time))
(format "%02d-%02d" (1+ (time->mon time))
(format "%02d-%02d" (time->mon time)
(time->mday time))))
;; length for lines: 5
;; We split the rest between author and subject
......
......@@ -1728,8 +1728,8 @@ Point must be located on the line where the subject is."
(goto-char (point-min))
(lyskom-format-insert-at-point 'text-no-comment
text-no
(lyskom-return-date-and-time
(lyskom-client-date))
(let ((kom-print-relative-dates nil))
(lyskom-format-time 'date-and-time))
(count-lines start end)
conf-stat
is-anonymous)
......
......@@ -439,7 +439,6 @@ Leave the conference again to unsubscribe completely.\n")
(weekdays-short . ["Sun" "Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun"])
(time-is . "The time is %#1s%#2s (according to the server).")
(time-is-week . "The time is %#1s%#2s, week %#3d (according to the server).")
(time-format-exact . "%#7s %4#1d-%02#2d-%02#3d %02#4d:%02#5d:%02#6d")
(xmaseve . "Christmas eve!\nYou didn't open any gifts early, did you?")
(xmasday . "Christmas day.\nDid you get any nice gifts this year?")
......@@ -830,17 +829,20 @@ Help: \\[describe-mode] ---")
(marked-by-you-and-others . "Marked by you (type: %#2s) and %#1?d%[someone else%]%[%#1d others%].\n")
(marked-by-several . "Marked by %#1d user%#1?d%[%]%[s%].\n")
(time-yyyy-mm-dd-hh-mm . "%4#1d-%02#2d-%02#3d %02#4d:%02#5d")
(timeformat-day-yyyy-mm-dd-hh-mm-ss . "%#7s %4#1d-%02#2d-%02#3d %02#4d:%02#5d:%02#6d")
(timeformat-yyyy-mm-dd-hh-mm-ss . "%4#1d-%02#2d-%02#3d %02#4d:%02#5d:%02#6d")
(timeformat-yyyy-mm-dd-hh-mm . "%4#1d-%02#2d-%02#3d %02#4d:%02#5d")
(timeformat-yyyy-mm-dd . "%4#1d-%02#2d-%02#3d")
(timeformat-hh-mm-ss . "%02#4d:%02#5d:%02#6d")
(timeformat-hh-mm . "%02#4d:%02#5d")
; used by lyskom-print-time
(time-y-m-d-h-m . "%4#1d %02#3d/%02#2d %02#4d:%02#5d ")
(time-hh-mm . "%02#1d:%02#2d")
(today-time-format-string . "%#6s %02#4d:%02#5d")
(yesterday-time-format-string . "%#6s %02#4d:%02#5d")
(format-time-date-and-time . "%#1s %#2s")
(format-time-just-date . "%#1s")
(format-time-just-time . "%#2s")
(today . "today")
(yesterday . "yesterday")
(no-such-text-no . "The text doesn't exist. (%#1:n)\n")
(time-yyyy-mm-dd . "%4#1d-%02#2d-%02#3d")
(text-created-at . "Created: %#1s\n")
(text-imported-at . "Imported: %#1s\n")
(text-imported-at-by . "Imported: %#1s by %#2P\n")
......@@ -3218,6 +3220,14 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
the default is 4096.")
(kom-dont-check-commented-authors-doc . "")
(kom-print-relative-dates-doc . "\
The time fields of texts (and a couple of other things) will be
\"today\" or \"yesterday\" if this setting is on and the text was
written today or yesterday, respectively. If it is off, absolute
dates will always be shown.")
(kom-print-seconds-in-time-strings-doc . "\
If this setting is on, some time strings (for example the creation
time of texts and sent messages) will include seconds.")
;;
......@@ -3378,6 +3388,8 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(kom-confirm-add-recipients-tag . "Ask if comments should be sent to new recipients:")
(kom-trim-buffer-minimum-tag . "How small parts of the LysKOM buffer are trimmed:")
(kom-dont-check-commented-authors-tag . "Authors not to check:")
(kom-print-relative-dates-tag . "Show relative dates:")
(kom-print-seconds-in-time-strings-tag . "Include seconds in time strings:")
)
)
......
......@@ -881,7 +881,10 @@ FOOTN-TO or FOOTN-IN."
yday
isdst
&optional tzhr tzmin)
"Create a time from all parameters."
"Create a time from all parameters.
Note: YEAR is the actual year, *not* years since 1900. MON is month
starting with *one* for January."
(cons
'TIME
(vector sec min hour mday mon year wday yday isdst tzhr tzmin)))
......
......@@ -2337,7 +2337,7 @@ calls use the most recently specified file name."
(defun lyskom-save-text (text-stat text filename)
"Save text in TEXT-STAT and TEXT to FILENAME."
(let ((buf (lyskom-get-buffer-create 'temp "*kom*-text" t))
(lyskom-print-complex-dates nil)
(kom-print-relative-dates nil)
(kom-deferred-printing nil))
(save-excursion
(set-buffer buf)
......@@ -3261,8 +3261,10 @@ If MEMBERSHIPs prioriy is 0, it always returns nil."
(lyskom-remove-unread-buffer proc)
(set-buffer (process-buffer proc))
(lyskom-start-of-command (lyskom-get-string 'process-signal) t t)
(lyskom-format-insert 'closed-connection sentinel
(lyskom-client-date-string 'time-format-exact))
(lyskom-format-insert 'closed-connection
sentinel
(lyskom-format-time
'timeformat-day-yyyy-mm-dd-hh-mm-ss))
(setq mode-line-process (lyskom-get-string 'mode-line-down))
(beep)
(lyskom-scroll))
......
......@@ -297,9 +297,9 @@ only recomputed if the window width changes."
(membership->conf-no
(lp--entry->membership entry)))
conf-stat)
(lyskom-return-date-and-time
(membership->last-time-read (lp--entry->membership entry))
'time-yyyy-mm-dd)
(lyskom-format-time
'date
(membership->last-time-read (lp--entry->membership entry)))
(if un (int-to-string un) "")
(if (membership-type->invitation (membership->type (lp--entry->membership entry))) ?I ?.)
......@@ -347,14 +347,15 @@ only recomputed if the window width changes."
(if (and (null conf-stat)
(eq 0 (time->sec (membership->created-at membership)))
(eq 0 (time->min (membership->created-at membership)))
(eq 0 (time->mon (membership->created-at membership)))
(eq 1 (time->mon (membership->created-at membership)))
(eq 1 (time->mday (membership->created-at membership)))
(eq 70 (time->year (membership->created-at membership))))
(eq 1970 (time->year (membership->created-at membership))))
(lyskom-format "Ingen information om när medlemskapet skapades")
(lyskom-format "%#1s %#2s av %#3P"
(if (membership-type->invitation (membership->type (lp--entry->membership entry)))
"Inbjuden" "Adderad")
(lyskom-return-date-and-time
(lyskom-format-time
'date-and-time