You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I will also paste all my formatters below in case someone may need them.
moduleFixymoduleFormatter# Justifies an alpha to the leftmoduleAlphanumericdefformat_alphanumeric(input,byte_width)input=input.to_sString.new(input).ljust(byte_width," ")endend# Formats a number 93 to "00000093"moduleNumericdefformat_numeric(input,byte_width)String.new(input.to_s).rjust(byte_width,"0")endend# Formats datetime to YYYYMMDDHHMMSSmoduleDateTimedefformat_datetime(input,byte_width)input.strftime("%Y%m%d%H%M%S")endend# Formats date to YYYYMMDDmoduleDatedefformat_date(input,byte_width)
::Date.strptime(input,"%d/%m/%Y").strftime("%Y%m%d")endend# Formats date to YYMMDDmoduleShortDatedefformat_short_date(input,byte_width)
::Date.strptime(input,"%d/%m/%Y").strftime("%y%m%d")endend# Formats floating point "9.34" to "000000934"moduleAmountdefformat_amount(input,byte_width)input="%0.2f" % inputinput.gsub(".","").rjust(byte_width,"0")endendendend
The text was updated successfully, but these errors were encountered:
diegoesp
changed the title
Alphanueric formatter does not work with accents
Alphanumeric formatter does not work with accents
Dec 28, 2017
Hi,
given the use of bytesize, accents confuse the algorithm.
Below an implementation that does not break positioting:
I will also paste all my formatters below in case someone may need them.
The text was updated successfully, but these errors were encountered: