op is not defined
Total books
Average rating
function format_nice_date(date_string) {
const date = new Date(date_string);
return new Intl.DateTimeFormat('en-US', { year: 'numeric', month: 'long', day: 'numeric' }).format(date);
}
added_function = aq.addFunction('format_nice_date', format_nice_date)
books_full
.derive({
time_actual: d => op.parse_date(d.timestamp),
pretty_date: d => format_nice_date(d.timestamp),
})
.orderby(aq.desc("time_actual"))
.select({"pretty_date": "Read date", "book_title": "Title", "book_author": "Author", "rating": "Rating"})
.view()
op is not defined
Here’s a login form. It doesn’t actually do anything. But if you needed to generate a JWT token for making POST requests, you could make it do something.