Permalink
Browse files

make convert! macros accept a list of places rather than a single place

  • Loading branch information...
1 parent cce89c3 commit dd0d8d0ce2c8ba940b7f6a883872a2e12d0040d3 @bobbysmith007 bobbysmith007 committed May 14, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 date.lisp
View
@@ -274,8 +274,10 @@
(regex-date-to-clsql-date)
))))))
-(defmacro convert-to-clsql-datetime! (place)
- `(setf ,place (convert-to-clsql-datetime ,place)))
+(defmacro convert-to-clsql-datetime! (&rest places)
+ `(setf ,@(iter (for p in places)
+ (collect p)
+ (collect `(convert-to-clsql-datetime ,p)))))
(defmethod convert-to-clsql-date (val)
(typecase val
@@ -284,8 +286,10 @@
(clsql-sys::wall-time (clsql-sys::time->date val))
(t (convert-to-clsql-date (convert-to-clsql-datetime val)))))
-(defmacro convert-to-clsql-date! (place)
- `(setf ,place (convert-to-clsql-date ,place)))
+(defmacro convert-to-clsql-date! (&rest places)
+ `(setf ,@(iter (for p in places)
+ (collect p)
+ (collect `(convert-to-clsql-date ,p)))))
(defun clsql-date/times->utime (obj &optional (timezone 0))
"obj is either a wall-time or a date in local time. Converts to UTC and returns a utime.

0 comments on commit dd0d8d0

Please sign in to comment.