Would you say, then, that Matthew 12:40 is using commom Jewish idiomatic language?
Well, since he was a Jew, then yes.
Modern society reckons the end of the day at midnight, which is an arbitrary time somewhere around (but rarely precisely) the middle of the time from sunset to sunrise.
No ancient culture reckoned days this way. This system doesn’t work very well unless you have clocks (which are roughly synchronized). How would you know, at night, when it was mid-way between sunset and sunrise? (in the daytime, you can determine noon with a sundial, but not at night.) With advanced knowledge of astronomy you could make a crude estimate, but you would lack accurate star charts (because nobody had clocks to make accurate charts in the first place, and a star chart without a reliable timeline is nothing more than a guess).
Neither the Jews nor the Romans regarded a “day” as a 24-hour period. To them, day and night were different things. We still use the word “day” ambiguously - it sometimes (often) means the period of daylight, and other times means a 24-hour period. We say “the days grow longer in summer” but of course the days are all 24-hours long.
We use words like “daytime” and “nighttime,” although a day includes both light and dark, but a night never includes the light.
And we use the word “night” ambiguously. If something wakes us at 2:00 AM, we commonly say we were awakened in the middle of the night. If we sleep well, we say, “I slept well all night” or “I got a good night’s sleep.” Nobody ever says, “I slept well for the last four hours of last night and the first four hours of this morning.” Even if we go to bed at midnight and sleep until eight, we still say we slept well all night, even though we technically didn’t sleep ANY at night.
FWIW, prior to the mid-1920’s, astronomers used a 12-hour offset clock - the day began and ended at noon. It was a hassle when 01:20 came after 23:20 (smaller numbers should not come after larger numbers). This offset caused nothing but confusion, and they finally adopted GMT/UTC. But, if you see old star charts, you have to offset the times by twelve hours.