"Leslie P. Polzer" <sky-A/[email protected]> 
writes:
> I think I haven't even looked once at the date parser;
> is it that hard to configure it at run-time with another
> format string?

There is another alternative, to use net-telent-date's parser that tries
really hard.

(defclass mdyhm-parser (weblocks:date-parser)
  ()
  (:documentation "Parse using net.telent.date, which includes what I
  really want: M/D[/Y] H[:M][pm], among many others."))

(defmethod weblocks:parse-view-field-value
    ((self mdyhm-parser) value obj view field &rest args)
  (declare (ignore self obj view field args))
  (let1 present? (weblocks:text-input-present-p value)
    (if present?
        (let1 date (ignore-errors (date:parse-time value))
          ;; This form only does the right thing when no zone was
          ;; specified in the date.  Unfortunately X3J13 only provides
          ;; DST tools for the current system timezone and locale.
          (date:with-decoding (date)
            (when date:daylight-p
              (decf date 3600)))
          (values date t date))
        (values t nil nil))))

-- 
Sorry but you say Nibiru is a Hoax?  Doesnt Exist?  So maybe The
Sumerian people doesnt exist also! --Anonymous by way of SkI

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to