Mercurial Hosting > nabble
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7ecd1a4ef557 |
---|---|
1 <macro name="date_script" parameters="js_function" requires="date"> | |
2 <n.set_var. name='tag_id'>d<n.raw_time/>-<n.random max="999"/></n.set_var.> | |
3 <span id="[n.var name='tag_id'/]"></span><script type="text/javascript"> | |
4 Nabble.get('<n.var name='tag_id'/>').innerHTML= <n.js_function/>(new Date(<n.raw_time/>)); | |
5 </script> | |
6 </macro> | |
7 | |
8 <macro name="long_format" requires="date"> | |
9 <n.date_script js_function="Nabble.formatDateLong"/> | |
10 </macro> | |
11 | |
12 <macro name="short_format" requires="date"> | |
13 <n.date_script js_function="Nabble.formatDateShort"/> | |
14 </macro> | |
15 | |
16 <macro name="date_only" requires="date"> | |
17 <n.date_script js_function="Nabble.formatDateOnly"/> | |
18 </macro> | |
19 | |
20 <macro name="time_only" requires="date"> | |
21 <n.date_script js_function="Nabble.formatTimeOnly"/> | |
22 </macro> |