Closed Fil closed 11 years ago
Cool, but can we go all the way and support seconds and minutes?
Oh yes in fact I think I meant "degrees and minutes" (blush).
Here's a more complete commit, following what Wikipedia says:
for example, 40.1875° = 40° 11′ 15″ . Sometimes single and double quotation marks are used instead: 40° 11' 15"
(with NS and WE of course)
And I wonder about what the degree symbol will be in the field. I chose a utf-8 "°" but maybe there are variants?
Hm, so I guess I mean seconds. I implemented something like this back in this: https://github.com/tmcw/coords/blob/master/index.js#L2-L11 but am not super confident in it. Speaking of which, this will need tests :)
I don't see how these tests work but if you write one I will follow and write the others.
Your code in coords looks fine but does not allow for ’’ and '' (two simple quotes, curly or not).
Merged and refactored into 0e9a0559c20dd4bb2aac14f5b717fdbde325c296 + https://github.com/tmcw/sexagesimal
Thanks!
Examples: