ePages 6.11.0 - DE_EPAGES/CSVExportImport/API/Tools.pm

Package DE_EPAGES::CSVExportImport::API::Tools

This module implements functions needed for csv export / import.

@EXPORT_OK
ParseValue
ParseFloat
ParseDateTime
FormatValue
FormatFloat
FormatDateTime

Functions

FormatDateTime
FormatFloat
FormatValue
ParseDateTime
ParseFloat
ParseValue

FormatDateTime

Localizes DateTime values.

Syntax
FormatDateTime( $Type, $rValue, $hFormat );
Input
$Type (string)
type of the attribute, could be 'Date', 'Time', 'DateTime'
$rValue (ref)
reference to value of the attribute
$hFormat (ref.hash.*)
format parameters, keys are
  • LocaleID - locale id - string

FormatFloat

Localizes float values.

Syntax
FormatFloat( $rValue, $hFormat )
Input
$rValue (ref)
reference to value of the attribute
$hFormat (ref.hash.*)
format parameters, keys are
  • DecimalSep - decimal separator - string
  • ThousandSep - thousands separator - string

FormatValue

Formats $Value according to $hFormat.

Syntax
FormatValue( $rValue, $Type, $hFormat );
Input
$rValue (ref)
reference to value of the attribute
$Type (string)
type of the attribute, could be 'Boolean', 'Integer', 'Float',
'Money', 'Price', 'Date', 'Time', 'DateTime'
$hFormat (ref.hash.*)
format parameters, keys are
  • LocaleID - locale id - string
  • DecimalSep - decimal separator - string
  • ThousandSep - thousands separator - string

ParseDateTime

Normalizes DateTime values.

Syntax
ParseDateTime( $Name, $Type, $rValue, $hFormat )
Input
$Name (string)
alias of the attribute
$Type (string)
type of the attribute, could be 'Date', 'Time', 'DateTime'
$rValue (ref)
reference to value of the attribute
$hFormat (ref.hash.*)
format parameters, keys are
  • LocaleID - locale id - string

ParseFloat

Normalizes float values.

Syntax
ParseFloat( $Name, $rValue, $hFormat )
Input
$Name (string)
alias of the attribute
$rValue (ref)
reference to value of the attribute
$hFormat (ref.hash.*)
format parameters, keys are
  • DecimalSep - decimal separator - string
  • ThousandSep - thousands separator - string

ParseValue

Tests variable and converts from external to internal representation.

Syntax
ParseValue( $Name, $Type, $rValue, $hFormat );
Input
$Name (string)
alias of the attribute
$Type (string)
type of the attribute, could be 'Boolean','Integer', 'Float',
'Money', 'Price', 'Date', 'Time', 'DateTime'
$rValue (ref)
reference to value of the attribute
$hFormat (ref.hash.*)
format parameters, keys are
  • LocaleID - locale id - string
  • DecimalSep - decimal separator - string
  • ThousandSep - thousands separator - string