[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #61212] feature request: split out time&date to read and convert th
From: |
Bernd Paysan |
Subject: |
[bug #61212] feature request: split out time&date to read and convert the time |
Date: |
Thu, 23 Sep 2021 19:35:13 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36 |
Update of bug #61212 (project gforth):
Status: None => In Progress
Assigned to: None => paysan
_______________________________________________________
Follow-up Comment #1:
[comment #0 original submission:]
> Currently there is a time&date word that reads the current time from the
system, and splits it out into s m h D M Y. I request splitting out the
conversion part to convert an arbitrary timestamp as returned from utime:
>
> : convert-to-time&date ( utime -- s m h D M Y ) ... ;
> : date&time ( -- s m h D M Y ) utime convert-to-time&date ;
>
> The existing date&time still operates the same way to preserve
compatibility, but the conversion part is made visible for users.
Looks like a good idea to make that binding to localtime more useful, yes. I
think it's ok to take seconds (localtime is only in second resolution), since
you could have used utime or ntime (µs or ns as resolution) in the first
place, and a simple um/mod helps you to convert that into µs and seconds or
ns and seconds.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61212>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/