Documentation ¶
Index ¶
- func Dict(v ...interface{}) (map[string]interface{}, error)
- func FormatDate(t *time.Time) string
- func FormatObservationValue(attribute config.Attribute, val any) string
- func FormatTime(t *time.Time) string
- func FormatYear(t *time.Time) string
- func NumberFormat(v interface{}) string
- func ToCheckboxValue(v interface{}) []string
- func ToInputDate(d string) string
- func ToInputDateTime(d string) string
- func ToRadioValue(v interface{}) string
- type FormattedDate
- type FormattedTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dict ¶
Dict creates a new map from the given parameters by treating values as key-value pairs. The number of values must be even. See https://github.com/Masterminds/sprig/blob/master/dict.go and https://github.com/gohugoio/hugo/blob/master/tpl/collections/collections.go
func FormatDate ¶
FormatDate formats the specified time in the Dutch time zone and language
func FormatObservationValue ¶
func FormatTime ¶
FormatTime formats the specified time in the Dutch time zone and language
func FormatYear ¶
FormatYear returns the year of the specied time.Time instance in the Dutch time zone
func NumberFormat ¶
func NumberFormat(v interface{}) string
NumberFormat formats the specified number as string. IMPROVE: access an interface argument (or generic) and support multiple number types
func ToCheckboxValue ¶
func ToCheckboxValue(v interface{}) []string
ToCheckboxValue converts the specified input to a slice of strings
func ToInputDate ¶
ToInputDate formats the specified date string, so it can be used as value for a datepicker input field
func ToInputDateTime ¶
ToInputDateTime formats the specified datetime string, so it can be used as value for a datetimepicker input field
func ToRadioValue ¶
func ToRadioValue(v interface{}) string
ToRadioValue converts the specified input to a string
Types ¶
type FormattedDate ¶
type FormattedDate openapi_types.Date
FormattedDate is used to unmarshal date values in Dutch format directly from POST bodies
func (FormattedDate) IsZero ¶
func (fd FormattedDate) IsZero() bool
func (FormattedDate) MarshalText ¶
func (fd FormattedDate) MarshalText() ([]byte, error)
func (*FormattedDate) UnmarshalText ¶
func (fd *FormattedDate) UnmarshalText(b []byte) error
type FormattedTime ¶
FormattedTime is used to unmarshal datetime values in Dutch format directly from POST bodies
func (FormattedTime) IsZero ¶
func (ft FormattedTime) IsZero() bool
func (FormattedTime) MarshalText ¶
func (ft FormattedTime) MarshalText() ([]byte, error)
func (*FormattedTime) UnmarshalText ¶
func (ft *FormattedTime) UnmarshalText(b []byte) error