npm install -D riot-format
let's define a riot tag
<app>
<p>Today is { format(now, 'date', 'yyyy-mm-dd') }</p>
this.now = new Date()
<app>
mixin it before you can use it
import format from 'riot-format'
import * as riot from 'riot'
format(riot) //mixin globally
riot.mount('app')
import { format } from 'riot-format'
let formatter = format(new Date(), 'date', 'yyyy-mm-dd')
console.log(formatter.current)
//Note: formatter.current is lazily evaluated until you access it