Home Reference Source
public class | source

fecha

Parse or format dates

Static Method Summary

Static Public Methods
public static

format(dateObj: Date | number, mask: string, i18nSettings: string): *

Format a date

public static

parse(dateStr: string, format: string, i18nSettings: string): Date | boolean

Parse a date string into an object, changes - into /

Static Public Methods

public static format(dateObj: Date | number, mask: string, i18nSettings: string): * source

Format a date

Params:

NameTypeAttributeDescription
dateObj Date | number
mask string

Format of the date, i.e. 'mm-dd-yy' or 'shortDate'

i18nSettings string

Return:

*

public static parse(dateStr: string, format: string, i18nSettings: string): Date | boolean source

Parse a date string into an object, changes - into /

Params:

NameTypeAttributeDescription
dateStr string

Date string

format string

Date parse format

i18nSettings string

Return:

Date | boolean