ADJUST-TIMESTAMP takes specifications with :SEC, :MINUTE, :HOUR etc. (why :MINUTE and not :MIN, btw?) to change data; but the getter functions are TIMESTAMP-SECOND, TIMESTAMP-MINUTE, TIMESTAMP-HOUR etc.
It would be nice to have either SETF functions with the same names (TIMESTAMP-SECOND etc.), or to have a function that uses the specifications from ADJUST-TIMESTAMP (a copy of %CONSTRUCT-TIMESTRING looks like a good candidate), to have a consistent way to access the parts of a timestamp.
The (TIMESTAMP-PART :SEC) version might be easier to use, as a single part name is sufficient for both getting and setting; the SETF TIMESTAMP-SECOND idea would again need passing two different functions on to the function.
(Yeah, I could do (FUNCALL (ENSURE-FUNCTION (list 'setf name)) new-value timestamp), but that's not so nice, is it?)
Well, one common way to get/set things would be nice.
ADJUST-TIMESTAMP
takes specifications with:SEC
,:MINUTE
,:HOUR
etc. (why:MINUTE
and not:MIN
, btw?) to change data; but the getter functions areTIMESTAMP-SECOND
,TIMESTAMP-MINUTE
,TIMESTAMP-HOUR
etc.It would be nice to have either
SETF
functions with the same names (TIMESTAMP-SECOND
etc.), or to have a function that uses the specifications fromADJUST-TIMESTAMP
(a copy of%CONSTRUCT-TIMESTRING
looks like a good candidate), to have a consistent way to access the parts of a timestamp.The
(TIMESTAMP-PART :SEC)
version might be easier to use, as a single part name is sufficient for both getting and setting; theSETF TIMESTAMP-SECOND
idea would again need passing two different functions on to the function. (Yeah, I could do(FUNCALL (ENSURE-FUNCTION (list 'setf name)) new-value timestamp)
, but that's not so nice, is it?)Well, one common way to get/set things would be nice.