Mercurial Hosting > nabble
view src/nabble/view/naml/date.naml @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children |
line wrap: on
line source
<macro name="date_script" parameters="js_function" requires="date"> <n.set_var. name='tag_id'>d<n.raw_time/>-<n.random max="999"/></n.set_var.> <span id="[n.var name='tag_id'/]"></span><script type="text/javascript"> Nabble.get('<n.var name='tag_id'/>').innerHTML= <n.js_function/>(new Date(<n.raw_time/>)); </script> </macro> <macro name="long_format" requires="date"> <n.date_script js_function="Nabble.formatDateLong"/> </macro> <macro name="short_format" requires="date"> <n.date_script js_function="Nabble.formatDateShort"/> </macro> <macro name="date_only" requires="date"> <n.date_script js_function="Nabble.formatDateOnly"/> </macro> <macro name="time_only" requires="date"> <n.date_script js_function="Nabble.formatTimeOnly"/> </macro>