jsdoc.custom

File: biweeklybudget/flaskapp/static/js/custom.js

fmt_currency(value)

Format a float as currency. If value is null, return  . Otherwise, construct a new instance of Intl.NumberFormat and use it to format the currency to a string. The formatter is called with the LOCALE_NAME and CURRENCY_CODE variables, which are templated into the header of base.html using the values specified in the Python settings module.

Arguments:
  • value (number) – the number to format
Returns:

string – The number formatted as currency

fmt_null(o)

Format a null object as “ ”

Arguments:
  • o (Object|null) – input value
Returns:

Object|string – o if not null,   if null

isoformat(d)

Format a javascript Date as ISO8601 YYYY-MM-DD

Arguments:
  • d (Date) – the date to format
Returns:

string – YYYY-MM-DD