▲ | bob1029 5 days ago | |||||||
I like to use the Japanese calendar as an example to scare the juniors away from DIY parsing: https://learn.microsoft.com/en-us/dotnet/api/system.globaliz... https://learn.microsoft.com/en-us/windows/apps/design/global... | ||||||||
▲ | colesantiago 5 days ago | parent | next [-] | |||||||
I don’t see anything wrong with this. This is actually a fun challenge. I encourage everyone to learn how to parse the japanese calendar format. The more people know the better! | ||||||||
▲ | kccqzy 4 days ago | parent | prev | next [-] | |||||||
Do your users type in such dates? No? Problem solved. The benefit of DIY parsing is to make the problem simple by restricting it to the set of plausible inputs your users will want your code to handle, not to make a highly general library. The right takeaway for juniors is to stop over-complicating things. | ||||||||
| ||||||||
▲ | its-summertime 4 days ago | parent | prev [-] | |||||||
I put these into an ISO8601 parser and it didn't work, I'm going to tell ISO off for obviously DIYing their solution instead of doing the proper thing. |