class Marten::Template::Tag::LocalTime
- Marten::Template::Tag::LocalTime
- Marten::Template::Tag::Base
- Reference
- Object
Overview
The local_time
template tag.
The local_time
template tag allows to output the string representation of the local time. It must be take one
argument (the pattern used to output the time). For example the following lines are valid usages of the
local_time
tag:
{% local_time "%Y" %}
{% local_time "%Y-%m-%d %H:%M:%S %:z" %}
Optionally, the output of this tag can be assigned to a specific variable using the as
keyword:
{% local_time "%Y" as current_year %}
Included Modules
Defined in:
marten/template/tag/local_time.crConstructors
Instance Method Summary
-
#render(context : Context) : String
Render the template tag for a given context.
Instance methods inherited from module Marten::Template::Tag::CanSplitSmartly
split_smartly(expression : String) : Array(String)
split_smartly
Instance methods inherited from class Marten::Template::Tag::Base
render(context : Context) : String
render
Constructor methods inherited from class Marten::Template::Tag::Base
new(parser : Parser, source : String)
new
Constructor Detail
Instance Method Detail
Description copied from class Marten::Template::Tag::Base
Render the template tag for a given context.