Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The title on HN includes „€1“, the original uses the „1€“ (which makes more sense I think, even when considering the reference to $1).


The original algorithm[1] comes from people working at a French university. In France we put the currency directly after the amount, without space : 1€.

[1]: https://gery.casiez.net/1euro/


Euro sign can be used before the amount, depending on the language and local norms, although I’ve seen it mostly after, separated by a space (150 €).


In English the currency symbol is typically before the number, whereas especially in Europe (with exceptions e.g. Switzerland) it is typically after the number. The title here is kind of correct in English I'd say, but the author is Dutch who happens to write in English.


At least with American currency it varies, e.g. one dollar is $1 while one penny is 1¢.


This actually is useful, because it allows the symbols to visual indicators when reading currency figures and can be used in a programmatic way. $ becomes a start marker for the beginning of a currency figure where the most significant digit is immediately after the marker and anything remaining after flows from that, and the same is true for cents where the symbol acts as an end marker and infers a lower bound. They can almost be thought of as start and end markers in regex, although they are not used together so not exactly that way.

It makes a sort of rational sense, at least to me.


The rationale I've always heard for having the $ at the beginning of the number was so that a handwritten value on, say, a check couldn't be modified by sticking a number at the beginning. 1.00$ could be forged into 91.00$, but not so with $1.00.


That rationale makes sense, and pretty much aligns with what I mean by a visual marker.


In the before-times (before the euro), we dutch used to write fl123,45 So putting the euro symbol in front comes naturally.


I wonder if it's because of the proximity to the UK, and that it influenced the choice of where to put it.


Interesting, I knew that it was written $1 for dollar but thought it depends on the currency, not the language.


My best answer is it depends on the language and country. E.g. Germans will write it after the number, whereas Swiss, who also officially speak German, will write it before the number. And yes, I needed to display some prices on a page recently, that had versions for Germany and Switzerland :-).


In Dutch the currency symbol always comes before the number as well, so this is intentional of the author.


Except he wrote in English, not Dutch :-)


Yes exactly, my point was that it works the same in English and Dutch. But other comments mentioned how its based on a French paper, where they do place the currency after the amount.


Ah, I'm sorry, I totally misread that.


Dan was my masters advisor and he’s Canadian, they used the French “spelling” because it’s a French paper.


It was moderated I think, the year 2020 was added as well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: