File

src/app/services/excel-date-formatter/excel-date-formatter.service.ts

Description

An MS Excel date parser/formatter service.

Index

Methods

Constructor

constructor()

Constructs the MS Excel date parser/formatter. ~constructor

Methods

formatDate
formatDate(excelDate: number)

Formats an Excel date.

Parameters :
Name Type Optional Description
excelDate number No

An Excel-format date.

Returns : string

The formatted date.

formatDates
formatDates(dateFields: string[], propertyName: string, propertyValue: any)

Formats a date if found in a date property filter.

Parameters :
Name Type Optional Description
dateFields string[] No

An array of date property name fields filter.

propertyName string No

The date field to check and process.

propertyValue any No

The property value to format and return.

Returns : any

The eventually formated property value.

getJsDateValueFromExcel
getJsDateValueFromExcel(excelDate: any)

Gets a javaScript-format date value from an Excel-format date.

Parameters :
Name Type Optional Description
excelDate any No

The Excel-format date or string representation.

Returns : Date

The javaScript-format date.

inTheFuture
inTheFuture(date: number)

Calculate whether started date is in the future.

Parameters :
Name Type Optional
date number No
Returns : boolean

results matching ""

    No results matching ""