tarbell-project / tarbell

A Flask-based static site authoring tool.
https://tarbell.readthedocs.io/en/latest/index.html
BSD 3-Clause "New" or "Revised" License
165 stars 32 forks source link

Get date object from format_date filter #418

Closed jheasly closed 8 years ago

jheasly commented 8 years ago

... by allowing None as a string format argument(s). No need for adding a third argument (as well as having to define a date format that you're not going to use anyhow!).

eyeseast commented 8 years ago

Merged this with a cherry-picked commit, so it's in. Thanks!

jheasly commented 8 years ago

Cool!
And, yeah, I definitely hear you about splitting things up:

Might be better to either add a new omnibus date filter, or add a couple smaller ones that deal with converting Excel dates and strings to datetime, and then another to format.

... 'cause it does seem kind of odd to have a filter capable of returning two different data types. But with the current default behavior, it's not something that you'd even know about unless you went spelunking into app.py.