UNPKG

ofx4js

Version:

A javascript OFX library, ported from OFX4J

40 lines (39 loc) 1.21 kB
import { StringConversion } from './StringConversion'; /** * Utility class for conversion to/from OFX strings. */ export declare class DefaultStringConversion implements StringConversion { toString(value: Object): string; fromString<E>(clazz: any, value: string): E; /** * Parses a date according to OFX. * * @param value The value of the date. * @return The date value. */ protected parseDate(value: string): Date; /** * Format the date according to the OFX spec. * * @param date The date. * @return The date format. */ protected formatDate(date: Date): string; /** * Pad a number with leading zeroes until it is of <tt>size</tt> length * * @param num number * @param size number of digits in final number * @return padded number */ private pad; /** * Pad a number with trailing zeroes until it is of <tt>size</tt> length. * Intended for numbers after a decimal point to get a fixed number of decimals * * @param num number * @param size number of digits in final number * @return padded number */ private dpad; }