Home Reference Source
import DateMask from 'bbj-masks/src/DateMask/DateMask.js'
public class | source

DateMask

DateMask

A javascript implementation for BBj dates masking

Static Method Summary

Static Public Methods
public static

mask(date: String, mask: String, locale: String, timezone: String): String

Mask date

Static Public Methods

public static mask(date: String, mask: String, locale: String, timezone: String): String source

Mask date

Mask the passed date with the passed mask

Params:

NameTypeAttributeDescription
date String

date as a string

mask String

mask as a string

locale String
  • optional
  • default: Browser's locale

the language to use ex(en-US). default is to the system language

timezone String
  • optional
  • default: System timezone

the time zone descriptor (e.g. America/Los_Angeles). default to the system timezone

Return:

String

a date masked with the given mask