all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Subsecond decoded-time again
@ 2019-09-29 11:01 Lars Ingebrigtsen
  2019-09-29 16:09 ` Paul Eggert
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2019-09-29 11:01 UTC (permalink / raw)
  To: emacs-devel

I was just looking at implementing the sub-second parts of ISO 8601,
but...  did the sub-second parts of `decode-time' disappear again?  I
thought I remembered that we settled on giving a special parameter to
`decode-time' to make it return the sub-second bits, too?

Was all that reverted at some point while I wasn't looking?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Subsecond decoded-time again
  2019-09-29 11:01 Subsecond decoded-time again Lars Ingebrigtsen
@ 2019-09-29 16:09 ` Paul Eggert
  2019-09-29 16:14   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggert @ 2019-09-29 16:09 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

On 9/29/19 6:01 AM, Lars Ingebrigtsen wrote:
> I thought I remembered that we settled on giving a special parameter to
> `decode-time' to make it return the sub-second bits, too?

Yes, it's the optional new FORM parameter of decode-time. E.g,, 
(decode-time '(1566009571321 . 1000) t t) yields ((31321 . 1000) 39 2 17 
8 2019 6 nil 0). This example is taken from the manual.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Subsecond decoded-time again
  2019-09-29 16:09 ` Paul Eggert
@ 2019-09-29 16:14   ` Lars Ingebrigtsen
  2019-09-29 18:19     ` Paul Eggert
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2019-09-29 16:14 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel

Paul Eggert <eggert@cs.ucla.edu> writes:

> On 9/29/19 6:01 AM, Lars Ingebrigtsen wrote:
>> I thought I remembered that we settled on giving a special parameter to
>> `decode-time' to make it return the sub-second bits, too?
>
> Yes, it's the optional new FORM parameter of decode-time. E.g,,
> (decode-time '(1566009571321 . 1000) t t) yields ((31321 . 1000) 39 2
> 17 8 2019 6 nil 0). This example is taken from the manual.

Ah, I was confused by this bit in the doc string:

----
The optional FORM specifies the form of the SEC member.  If ‘integer’,
SEC is an integer; if t, SEC uses the same resolution as TIME.  An
omitted or nil FORM is currently treated like ‘integer’, but this may
change in future Emacs versions.
----

I think "if t, SEC uses the same resolution as TIME" could possibly be
expanded upon.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Subsecond decoded-time again
  2019-09-29 16:14   ` Lars Ingebrigtsen
@ 2019-09-29 18:19     ` Paul Eggert
  2019-09-29 18:48       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggert @ 2019-09-29 18:19 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]

On 9/29/19 11:14 AM, Lars Ingebrigtsen wrote:
> I think "if t, SEC uses the same resolution as TIME" could possibly be
> expanded upon.

Sure, I installed the attached.


[-- Attachment #2: 0001-src-timefns.c-Fdecode_time-Improve-doc-string.patch --]
[-- Type: text/x-patch, Size: 1148 bytes --]

From 53ebec24c871c5e6adb6aed088199d1b15e0198a Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 29 Sep 2019 13:11:59 -0500
Subject: [PATCH] * src/timefns.c (Fdecode_time): Improve doc string.

---
 src/timefns.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/timefns.c b/src/timefns.c
index c1e3141c4c..330d5623f0 100644
--- a/src/timefns.c
+++ b/src/timefns.c
@@ -1472,9 +1472,9 @@ the TZ environment variable.  It can also be a list (as from
 without consideration for daylight saving time.
 
 The optional FORM specifies the form of the SEC member.  If `integer',
-SEC is an integer; if t, SEC uses the same resolution as TIME.  An
-omitted or nil FORM is currently treated like `integer', but this may
-change in future Emacs versions.
+SEC is an integer; if t, SEC is an integer or (TICKS . HZ) timestamp
+with the same precision as TIME.  An omitted or nil FORM is currently
+treated like `integer', but this may change in future Emacs versions.
 
 To access (or alter) the elements in the time value, the
 `decoded-time-second', `decoded-time-minute', `decoded-time-hour',
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Subsecond decoded-time again
  2019-09-29 18:19     ` Paul Eggert
@ 2019-09-29 18:48       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2019-09-29 18:48 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel

Paul Eggert <eggert@cs.ucla.edu> writes:

> On 9/29/19 11:14 AM, Lars Ingebrigtsen wrote:
>> I think "if t, SEC uses the same resolution as TIME" could possibly be
>> expanded upon.
>
> Sure, I installed the attached.

Thanks!

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-29 18:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-29 11:01 Subsecond decoded-time again Lars Ingebrigtsen
2019-09-29 16:09 ` Paul Eggert
2019-09-29 16:14   ` Lars Ingebrigtsen
2019-09-29 18:19     ` Paul Eggert
2019-09-29 18:48       ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.