It was pointed out by Mark Lord on the EmpegBBS that Google prints the "am" and "pm" parts of their sunrise/sunset times differently, depending on your locale.
I'm parsing for uppercase AM and uppercase PM only. Which works in the US. But Mark is in Canada, and if you're browsing from, for example Montreal, then it prints "a.m." in lower case with dots, and "pm" in lower case without dots. My parser needs to compensate for all of those possibilities.
This is hard to test in real-world, because in order to see the differing behavior, you can't just simply google for "sunrise Montreal". It doesn't change the formatting in that case. You have to use the LocationGuard plugin in your browser and spoof your location to see the difference.
It was pointed out by Mark Lord on the EmpegBBS that Google prints the "am" and "pm" parts of their sunrise/sunset times differently, depending on your locale.
I'm parsing for uppercase AM and uppercase PM only. Which works in the US. But Mark is in Canada, and if you're browsing from, for example Montreal, then it prints "a.m." in lower case with dots, and "pm" in lower case without dots. My parser needs to compensate for all of those possibilities.
This is hard to test in real-world, because in order to see the differing behavior, you can't just simply google for "sunrise Montreal". It doesn't change the formatting in that case. You have to use the LocationGuard plugin in your browser and spoof your location to see the difference.