# Decimal commas vs. decimal points (and a few dashes of thousands separators)

**URL:** <https://forum.beeminder.com/t/decimal-commas-vs-decimal-points-and-a-few-dashes-of-thousands-separators/10931>\
**Category:** Bugabee\
**Created:** [April 22, 2023, 4:21pm UTC](https://forum.beeminder.com/t/decimal-commas-vs-decimal-points-and-a-few-dashes-of-thousands-separators/10931 "2023-04-22T16:21:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![enbee](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/enbee/32/4796_2.png) [@enbee](https://forum.beeminder.com/u/enbee)\
**Post date:** [April 22, 2023, 4:21pm UTC](https://forum.beeminder.com/t/decimal-commas-vs-decimal-points-and-a-few-dashes-of-thousands-separators/10931/1 "2023-04-22T16:21:49Z")

</div>

so, i believe that the official stance on this is probably still

> [@Trying to make a point. or: You must have too many stickers](https://forum.beeminder.com/t/trying-to-make-a-point-or-you-must-have-too-many-stickers/4811/23):
>
> My rough sense is that (for now) Beeminder should just stick to periods as radix and avoid commas as much as possible.

> [@Trying to make a point. or: You must have too many stickers](https://forum.beeminder.com/t/trying-to-make-a-point-or-you-must-have-too-many-stickers/4811/28):
>
> Properly internationalizing Beeminder, even for such a seemingly small thing as radix, is just not on the roadmap very soon.

i assume that the big majority of bees uses decimal points instead of decimal commas, and this is such a minor nitpick that even i understand it’s not worth the coding effort to have an either/or option (or to automatically change it based on region, or whatever else would be easiest)—at least not compared to other feature requests!

i just wanted to throw my hat in the ring for this as well, specifically for making decimal commas valid in browsers. (the android app, at least for me, automatically opens a numeric keypad that only has a decimal point as an option, so there’s not much room for confusion/annoyance.) (there’s a thread focused on an old, long-resolved ios bug, that for a while made entering decimal numbers basically impossible: [Trying to make a point. or: You must have too many stickers](https://forum.beeminder.com/t/trying-to-make-a-point-or-you-must-have-too-many-stickers/4811))

my main reason for wanting a decimal-comma-option (on the browser interface): the layout of the numeric keypad on german keyboards. there’s no `.` there for me to press next to the numbers. i have to go a bit to the left to press the regular `.` key if i want to use a decimal point. (there’s a `,` on the bottom of the numeric keypad, though, because we use decimal commas. right within reach of all the numbers!)  
[image of a german keyboard to illustrate my description](https://asset.conrad.com/media10/isa/160267/c1/-/en/1397137_BB_00_FB/image.jpg) (i will say that the distance between the `.` key and the numeric keypad _for me personally_ is a bit shorter than it is in the image, because all keys are more compressed on laptop keyboards. it’s still a significant difference, though, given that the decimal comma is right there on the numeric keypad.)

also (vaguely) related: thousands separators!

> [@UI: Should the numbers in the Bare Min box of odometer goals be absolute rather than relative?](https://forum.beeminder.com/t/ui-should-the-numbers-in-the-bare-min-box-of-odometer-goals-be-absolute-rather-than-relative/836/30):
>
> Maybe thousands separator should be an eventual number format setting in goal options. I don’t know if everyone cares for a thousands separator, and the appropriate separation convention differs by region.

i care way less for this than for the decimal-separator-discussion, but i do think that eventually having thousands separators would be neat! i assume that everyone’s steps goals regularly suprass 1 000 steps/day, and it would absolutely be neat to more easily see at a glance if yesterday’s steps were 1 500 or 15 000! but since, out of all my six current goals, my steps goal is the _only_ one to regularly exceed 1 000, and since it’s never bothered me too much (i usually look directly into the garmin app to see my steps count, or on my watch), i feel like having thousands separators would merely be a nice, visual perk. no practical advantage for me here like there would be with the decimal commas.  
if a thousands separators option is ever implement, i’d appreciate it if “blank” was an option as well, instead of the (probably more common?) comma or point. (so “1 000” like i wrote above, instead of “1,000” or “1.000”.) it might be personal preference or confusion with regards to decimal separators **°** , but i think i’d prefer it like this! (especially since the problem of blanks creating line breaks, which might be an issue here in forum posts, wouldn’t be one in beeminder, i _think‽_)  
**°** how i learned it: decimal commas; points as thousands separators. / how the majority of the internet learned it (usa etc.): decimal points; commas as thousands separators.—i think i can deal well with switching/remembering one version (whether it’s mine or “the other one”) when it _just_ comes to the decimal values. having to also think about the thousands separator as something either similar and/or different from what i’m used / from the decimal separator system, sounds like too much mental gymnastics XD hence my personal preference for the blank!

sorry for creating yet another topic about this! but it somehow didn’t really feel right to add this rambling to either one of the two or three topics that already mention decimal separators. (which are also all at least 3 years old.) if someone disagrees, though, feel free to move this post to one of them!

---

<div class="post-metadata">

**Author:** ![zzq](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/zzq/32/6471_2.png) [@zzq](https://forum.beeminder.com/u/zzq)\
**Post date:** [April 22, 2023, 6:09pm UTC](https://forum.beeminder.com/t/decimal-commas-vs-decimal-points-and-a-few-dashes-of-thousands-separators/10931/2 "2023-04-22T18:09:49Z")

</div>

The neat thing about the web is that is extremely customizable; though the chance of Beeminder ever supporting decimal commas is very low indeed, on the web you can just write your own user script or browser extension.

You can “monkeypatch” Beeminder’s javascript: go look through their front-end code with the browser’s dev tools, find the function you want to modify, save a copy of the original version in a variable, then write your own version that reformats the data before calling the saved version of the function.

I make absolutely no guarantees about the following code which I threw together with a few minutes of poking around; it’s the simplest thing that could possibly work, munging the data with regexes, rather than code that is particularly maintainable or robust. You can use it as a starting point; I’m giving it merely as an example of the kind of thing you could do:

```javascript
const originalAddDatapoint = beemApi.addDatapoint

beemApi.addDatapoint = function(slug, { urtext }, ...args) {
    const dayOfMonth = $("form.add-data-form .add-data-date").val()

    const urtextWithoutDay = urtext.replace(dayOfMonth + ' ', '')

    const [, value, comment] = urtextWithoutDay.match(/([^]*)(.*)/)

    const formattedValue = value.replace(',', '.')

    const newUrtext = dayOfMonth + ' ' + formattedValue + comment

    return originalAddDatapoint.call(this, slug, { urtext: newUrtext }, ...args)
}

```

This monkeypatches the `addDatapoint` function, with the `replace(',', '.')` line doing the actual work and the rest just disassembling the urtext string which is the concatenation of the date, value, and comment. Used as a userscript, it would make Beeminder see decimal points where the you enter decimal commas, meaning that you get to enter datapoints in the format you like, and Beeminder sees them in the format it accepts.

The point isn’t limited to these specific lines of code, of course—rather, I encourage having a mindset in which one realizes that websites can be customized to work the way you like, even if it isn’t something the website owners feel inclined to do.

---

<div class="post-metadata">

**Author:** ![enbee](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/enbee/32/4796_2.png) [@enbee](https://forum.beeminder.com/u/enbee)\
**Post date:** [April 22, 2023, 6:34pm UTC](https://forum.beeminder.com/t/decimal-commas-vs-decimal-points-and-a-few-dashes-of-thousands-separators/10931/3 "2023-04-22T18:34:22Z")

</div>

thank you so much for this (both the general reminder and the code)!

unfortunately, i have absolutely zero coding-knowledge, so this isn’t something i could just play around with for a bit until it works. (well, i think we did a bit of html in school once, but that’s obviously not useful in this case.)  
fortunately, i have friends who will be able to help me, so we should be able to figure something out if your code doesn’t already work.

---

<div class="post-metadata">

**Author:** ![sheik](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/sheik/32/5107_2.png) [@sheik](https://forum.beeminder.com/u/sheik)\
**Post date:** [April 22, 2023, 11:56pm UTC](https://forum.beeminder.com/t/decimal-commas-vs-decimal-points-and-a-few-dashes-of-thousands-separators/10931/4 "2023-04-22T23:56:19Z")

</div>

Same, I don’t like it when beeminder rejects my commas ☹
