Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e6a4a267
Commit
e6a4a267
authored
Jul 07, 1993
by
Richard M. Stallman
Browse files
(mail-rfc822-time-zone, mail-rfc822-date): New fns.
parent
f3098917
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
lisp/mail/mail-utils.el
lisp/mail/mail-utils.el
+15
-0
No files found.
lisp/mail/mail-utils.el
View file @
e6a4a267
...
...
@@ -211,6 +211,21 @@ If third arg ALL is non-nil, concatenate all such fields with commas between."
"
\\
|
"
(substring labels (match-end 0))))))
labels)
(defun mail-rfc822-time-zone (time)
(let* ((sec (or (car (current-time-zone time)) 0))
(absmin (/ (abs sec) 60)))
(format "
%c%02d%02d
" (if (< sec 0) ?- ?+) (/ absmin 60) (% absmin 60))))
(defun mail-rfc822-date ()
(let* ((time (current-time))
(s (current-time-string time)))
(string-match "
[^
]+
+\\
(
[^
]+\\
)
+\\
(
[^
]+\\
)
\\
(
[^
]+\\
)
\\
(
[^
]+\\
)
" s)
(concat (substring s (match-beginning 2) (match-end 2)) "
"
(substring s (match-beginning 1) (match-end 1)) "
"
(substring s (match-beginning 4) (match-end 4)) "
"
(substring s (match-beginning 3) (match-end 3)) "
"
(
mail-rfc822-time-zone
time
))))
(
provide
'mail-utils
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment