Blog

  • LibreOffice Calc: Day 0

    On spreadsheets, date and time calculations are important. What about numeric representations?

    Today I entered 2026-may-29 on a LibreOffice Calc spreadsheet, then pressed Enter. It self-converted to 2026-05-29. Next, I clicked “Format as Date.” It answered with 46171.

    I wondered how it was getting that number, so looked it up. Apparently, by default in LibreOffice Calc, Day 0 was Dec 30, 1899. Every day since increments the date by 1. Therefore, Jan 1, 1900, as a numeric date, is 2. Jan 1, 1901, 365 days later, is 367, and so on. (1900 was not a leap year, believe it or not. I was surprised, too; that’s for another post.)

    On spreadsheets, dates are normally compared with other dates, so the “zero reference” might not matter too much, so long as it’s consistent. However, Excel’s day 1, apparently, is January 1, 1900 (whereas LibreOffice thinks that’s day 2, it seems).

    Therefore, one wonders: how compatible are LibreOffice Calc and Excel spreadsheets? Well, it seems that a LibreOffice Calc sheet can be saved in xlsx format. What about changing the default start date? Apparently, one can do that as well.

    This post is spilling in numerous directions; I plan to follow up. For now, at least, it seems clear how 2026-05-29 becomes 46171 on a LibreOffice Calc spreadsheet.

    Source:

    LibreOffice 26.2 Help: Date and Time Functions

    Microsoft Support: DATEVALUE function

    learn.microsoft.com: …1900 is not a leap year as a century needs to be divisible by 400 to be a leap year.

    -JS

  • JavaScript: random numbers

    JavaScript is a versatile language, even for testing. What about its random numbers?

    The following is from my reference frame:

    JavaScript has Math.random() to generate a random number between 0 and 1. However, it would be reassuring if one could seed the random number generator. Yet, it seems that Math.random() can’t be seeded by the user.

    In connection, Mozilla suggests the crypto library: crypto.getRandomValues(input_array). The input_array needs to be a declared type, which was surprising to me: I don’t recall JavaScript being a typed language.

    The following lines capture the idea of how one might use crypto.getRandomValues():

    let input_array = Int8Array(10); //10 values

    crypto.getRandomValues(input_array);

    let a_random_value=input_array[3]; //for example

    JavaScript can be a fun language to experiment with:)

    Source:

    developer.mozilla.org: Math.random()

    developer.mozilla.org: Crypto: getRandomValues method

    developer.mozilla.org: Int8Array

    -JS

  • Electronic lifestyle: authenticator apps

    One GenXer faces the authenticator premise.

    For maybe two years, I’ve heard about authenticator apps. I don’t generally like to change if it’s not needed, so for a long time I didn’t use one.

    At the same time, I appreciated the advantage of two factor authentication: if someone gets your username and password, they still need to get something off your phone, for instance, to log in. Nowadays, a typical person always has their phone on hand, so a hacker penetrating two factor authentication seems a lot less likely than just cracking a name and password.

    For a long time I just would provide my texting number and get the second code for 2fa that way. Yet, some places don’t seem to want that. (Perhaps I’ll look into why in another post.)

    Yesterday I finally broke down and decided to try an authenticator app. The research behind it took about an hour, but downloading it, then putting it to use, took only around five minutes. So far, I’m impressed.

    I’m not going to say which authenticator app I adopted, because people have their own reasons for choosing one versus the other. However, I began with a very helpful video from Cyber Lab on YouTube: Best Authenticator Apps in 2025 (Top 5 Tested and Reviewed).

    Cyber Lab’s video, about twelve minutes long, goes deeper than I had been thinking regarding authenticator apps. It gave me some very useful perspective.

    In broad strokes, here’s my experience.

    • The app I went with, I downloaded from Google Play onto my mobile phone.
    • Later, I was logged into a site on a PC where it offered 2fa.
    • How a site offers to turn on 2fa, with an authenticator, seems to be that it shows a QR code one can scan. (A printed code may be shown as well, which one can enter manually.)
    • I opened my mobile phone, opened the authenticator app, then tapped that I wanted to add a new input.
    • Next, I scanned the QR code.
    • An authentication number then appeared on the screen for me to enter, which I entered at the site for 2fa.
    • Then, 2fa was set up through the authenticator app.

    After 2fa is established between the site and the authenticator, it’s simpler. When one goes to log in at the site with 2fa, one enters their username and password as usual. Next, the site sends the user to the authenticator app to retrieve a log-in code.

    That’s my experience, anyway. Like I say, I’m happy with it.

    -JS

  • Hello world!

    Welcome to WordPress. This is your first post. Edit or delete it, then start writing!