Hacker News new | ask | show | jobs
by krapp 3836 days ago
I'm surprised PHP doesn't already have US_state_name_to_abbreviation() and US_state_abbreviation_to_name() baked in already. This is a language that supports[0] Swatch Internet time[1]. Literally, a "time" format made up as a gimmick to advertise one specific brand of wristwatch from the late 1990s.

I hope someone on Hacker News who contributes to the PHP core can attempt to correct this discrepancy.

[0]http://www.php.net/manual/en/function.idate.php

[1]https://en.wikipedia.org/wiki/Swatch_Internet_Time

1 comments

I suspect it would be US_state_name_to_abbreviation() and USStateAbbr2Name() in order to meet PHP's consistency requirements.
When I developed in PHP, I could never understand why they didn't just reach a compromise that made everyone happy. Like uS_state_nameToAbbreviation() and uSStateAbbr_to_name()

I call it camel_Snake.

Great, now I have tea all over my desk.

Although it was totally worth it. ;-)