View Single Post
Old 06-05-2016, 08:33 PM   #22
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,832
Karma: 30277270
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Joanna View Post
Does the format of numbers change when you switch the language version in your Calibre?
No, it seems to be dependent on the value of the format in the column definition, the calibre language and OS region settings appear to be irrelevant. But I'm not 100% certain on that even.

I'm not very knowledgeable on python format strings, this {:,2f} put the comma before the decimal but I couldn't figure out how to mark the thousands with comma, dot, or space and some decimal parts got rounded!!

I had to add a column as I didn't have any floats. It would help if there were a some examples of formatting floats in the custom column window, the link to the python doco is definitely in the tl:dr class - could not see an example of formatting common monetary values even.

As I recall C's printf was a PITA when it came to applying commercial formats to floats. I used something that formatted floats using a mask, similar to date formatting. The python formatting appears to be little more than warmed up printf formatting.

I think I have exhausted my knowledge and ideas - chaley will no doubt be back to help after he's had a kip

BR

Last edited by BetterRed; 06-05-2016 at 09:27 PM.
BetterRed is offline   Reply With Quote