implement date_part/Extract in JS (Fixes #380)

For use in filtering.

Not all fields currently implemented (see #399).