Time Data Series: It’s Not What You Said; It’s How You Said It

In my last post on PHP Zmanim, I said the next thing I’d write about was astronomy calculations. I still plan to do that, but something came up recently that caught my attention, so I’m going to talk about that instead. I still plan to get to the astronomy stuff.

Sephardi vs. Ashkenazi

No, not kitniyot. No, not how to hang your mezuzzah. No, not whether you have to use water challah or if egg challah is ok. I’m talking about the “T” sound in certain words.

Consider:

Bereshis Bereshit
Ki Seitzei Ki Teitzei
Teves Tevet

There are more, but (if you read/speak Hebrew or have been part of orthodox Jewish communities for any length of time) you get the point. These two traditions have different ways of pronouncing certain sounds, and therefore, the English transliteration changes. And like any tradition, those who adhere to one or the other can be passionate about insisting on the “correct” usage.

PHP Zmanim, on its own, is “coded” using Ashkenazi-style transliterations. But that doesn’t mean you can’t change that and do so fairly easily. In the next few sections, I’m going to show you how to take the pre-existing transliterations for dates, holidays, and Torah Portion titles and convert them so that they appear in whatever way YOU want.

Step 1: Create Your Map

For month names, Torah portion titles, holidays, and more, PHP Zmanim has a map of values. Let’s start with the easiest one – months.

This is just a simple array of values:

Plain Text

 

In order to “fix” this and use the transliteration you want (in this case, it’s probably only “Teves” that has to change), you’d first re-create the array:

Plain Text

 

Step 2: Set Up Your Calendar

For holidays, you’ll use that the jewishCalendar object (which we covered in the previous blog post).

First, we set the year, month, and day variables and create a Jewish calendar object:

PHP

 

Put It All Together

Next, we initialize the PHP Zmanim format and then push the new transliterated months into PHP Zmanim:

PHP

 

Finally, we take that output that format to a variable:

PHP

 

The result would be:

Plain Text

 

And yes, if you are wondering, in 2025, the day numbers (1, 2, 3, etc.) for the month of Tevet and the month of January match up.

Happy Holidays!

Holiday transliterations are handled similarly, even if there are a few minor differences.

Start off with the same initial setup of the date and calendar object:

PHP

 

Next, we’ll set the holiday transliterations the same way we did for months:

PHP

 

Next, we initialize the PHP Zmanim format and then push the new transliterated months into PHP Zmanim:

PHP

 

Finally, we use the calendar information and (if it’s a holiday) get the output:

PHP

 

Echoing $zmanholiday would look like this:

Plain Text

 

NOTE: For those who aren’t familiar, “The Tenth of Tevet” (or “Asarah B’Tevet”) is fast day, and has it’s own special set of observances.

What’s in a Name?

Our last example deals with the transliteration of Torah portion names — whether one renders the first portion in Torah “Bereshis” or “Beresheet”. For this, PHP Zmanim uses an array of key-value pairs, where all you need to do is change the value, and leave the key alone. Here’s what it looks like unchanged:

PHP

 

And here are the edits I’m making for my (Sephardic) synagogue:

PHP

 

Using this within your code follows the same pattern we’ve established with dates and holidays.

Before we start coding, it’s important to note that you have to ensure the “Parsha” class is being used by your code:

Plain Text

 

It’s also important for you to know that PHP Zmanim will only output a Torah Portion if the date given is a Saturday, so you might need to take any given date and find the upcoming (or previous) Saturday in order to get the right result.

Once those items are handled, you start by establishing the calendar object as with our other examples:

PHP

 

Create the new transliteration variable (note that this is only partially rendered. You can find the full key-value array at (as of the time of this writing) line 169 on the PHP Zmanim GitHub repo)

Plain Text

 

Next, we initialize the format and then push the new transliterated array:

PHP

 

Finally, we use the calendar information to grab the correct Torah potion transliterated the way we want it:

PHP

 

Echoing the output would give us:

Plain Text

 

What More Is There to Say?

For some, this all might seem like an unnecessary amount of work for a few spelling differences. For folks who haven’t spent a lot of time in groups where different Jewish cultures mix, it can be jarring to find out just how passionate people feel about these things.

Now, remind me again about the “proper” way to pronounce GIF.

Source:
https://dzone.com/articles/time-data-series-how-you-said-it