andrewmcveigh / cljs-time

A clj-time inspired date library for clojurescript.
342 stars 57 forks source link

Quoted Text in Formats Not Working as Expected #103

Closed tjscollins closed 6 years ago

tjscollins commented 7 years ago

The following code:

(ns example.core
    (:require [cljs-time.format :as f]))

(f/parse (f/formatter "MMMM dd, YYYY 'at' H:mm a") "July 1, 2017 at 10:00 am")

Does not work as expected. It does work for clj-time, but for cljs-time it throws an error:

error {:message "Quoted text not found", :data {:type :parse-error, :where :parse-quoted}}

Error: Quoted text not found

Not sure if there's supposed to a different format for quoting in cljs-time, but I assume it's supposed to work the same as clj-time.

andrewmcveigh commented 7 years ago

Yes, this should work. Not sure why it doesn't to be honest, there are tests around quoted text (though admittedly they aren't that extensive).