3 ms·
> Is it a struggle though? It’s twelve lines or more, if you include the imports and error handling. Spreadsheets and SQL will coerce a string to a date witho
by michaelt 2y ago
> Is it a struggle though?
It’s twelve lines or more, if you include the imports and error handling.
Spreadsheets and SQL will coerce a string to a date without even being asked to. You might want something more structured than that, but you should be able to do it in far less than 12 lines.
C has many clunky elements like this, which makes working with it like pulling teeth.
- sitzkrieg 2y agoalmost like C is logically operating at a lower level than spreadsheets or SQL or something
- oguz-ismail 2y ago> you should be able to do it in far less than 12 lines In C++, maybe. In C, not necessarily. If you're not willing to reinvent the wheel why'd you choose C anyway?
- Suppafly 2y ago>Spreadsheets and SQL will coerce a string to a date without even being asked to. But only when you don't want them to, when you do want them to do it it's still a pain.
- stonogo 2y agoSpreadsheets and SQL will coerce a string to a date because someone programmed them to in C or C++.