liquid.js icon indicating copy to clipboard operation
liquid.js copied to clipboard

Replace strftime with something that doesn't need the document object

Open stewartknapman opened this issue 10 years ago • 4 comments

@mattmccray would you consider replacing strftime with something that doesn't need the document object?

The reason I ask, is I am working on a static generator that is running in the command line and the document object doesn't exist in this environment. I'm going to implement the change in my fork but I wanted to know if it was something you would be interested in?

The libs I'm considering are https://github.com/samsonjs/strftime and https://github.com/moment/moment

stewartknapman avatar Sep 12 '15 06:09 stewartknapman

Yeah, I'm all for that. I'd go with strftime, moment too heavy for this use IMO.

mattmccray avatar Sep 12 '15 18:09 mattmccray

Yea, that was my ferling as well. I'll let you know when I have something.

stewartknapman avatar Sep 12 '15 21:09 stewartknapman

Question: The tests seem to be passing for me without etc/split.js, and I can't see where it is being used. How necessary is that?

stewartknapman avatar Sep 19 '15 07:09 stewartknapman

If I recall correctly, that was for older IE browsers. I'm not sure if it's really necessary anymore or not. I'd say if it passes on IE9+, then it's good.

IE8 is dead, yay!

mattmccray avatar Sep 20 '15 17:09 mattmccray