vapor / template-kit

📄 Easy-to-use foundation for building powerful templating languages in Swift.
MIT License
46 stars 17 forks source link

add public TemplateData.date var #18

Closed grundoon closed 6 years ago

grundoon commented 6 years ago

Since Date has been extended with convertToTemplateData(), it's been suggested that a convenience for going in reverse might be useful in order to simply parameter.date within tags.

0xTim commented 6 years ago

(It would be great to see a test covering this)

grundoon commented 6 years ago

Oops, gotcha @0xTim – not the prettiest of tests, but gets the job done and passes.

grundoon commented 6 years ago

NOTE: Because I screwed up in not pre-branching, this should probably be merged after https://github.com/vapor/template-kit/pull/19 to avoid potential conflict in TemplateData and TemplateDataEncoderTests.

penny-coin commented 6 years ago

Hey @grundoon, you just merged a pull request, have a coin!

You now have 44 coins.