Home Reference Source

Function

Static Public Summary
public

Takes incomplete iso string and return a complete one

public

Get day number in the year of the passed date

public

Get the browser timezone name , if not supported then the browser timezone offset formatted

public

getWeekNumber(date: Date, weekStart: Number): Number

Get the Week Number in the passed date

public

getWeekStartByLocale(locale: locale): Number

Find out when the first day of the week based on the passed locale

Static Public

public fixShortISO(date: String): String source

import {fixShortISO} from 'bbj-masks/src/DateMask/DateMask.js'

Takes incomplete iso string and return a complete one

Params:

NameTypeAttributeDescription
date String

incomplete iso string

Return:

String

complete iso string

public getDayOfYear(date: Date): Number source

import {getDayOfYear} from 'bbj-masks/src/DateMask/DateMask.js'

Get day number in the year of the passed date

Params:

NameTypeAttributeDescription
date Date

Return:

Number

day number

public getTimezoneOrOffset(): String source

import {getTimezoneOrOffset} from 'bbj-masks/src/DateMask/DateMask.js'

Get the browser timezone name , if not supported then the browser timezone offset formatted

Return:

String

timezone of offset

public getWeekNumber(date: Date, weekStart: Number): Number source

import {getWeekNumber} from 'bbj-masks/src/DateMask/DateMask.js'

Get the Week Number in the passed date

Params:

NameTypeAttributeDescription
date Date

Date object

weekStart Number

A number which defines the first day of the week (0 = sunday , 1 = monday , ...)

Return:

Number

the week number

public getWeekStartByLocale(locale: locale): Number source

import {getWeekStartByLocale} from 'bbj-masks/src/DateMask/DateMask.js'

Find out when the first day of the week based on the passed locale

Params:

NameTypeAttributeDescription
locale locale

Return:

Number

a number 0 = sunday , 1 = monday , ....